     end
   end
 
+  defp get_version(version) do
+    {:ok, version} = Version.parse(version)
+    "#{version.major}.#{version.minor}" <>
+      case version.pre do
+        [h|_] -> "-#{h}"
+        []    -> ""
+      end
+  end
+
   defp in_umbrella? do
     apps = Path.dirname(File.cwd!)
 

    def project do
      [app: :<%= @app %>,
       version: "0.0.1",
       elixir: "~> <%= System.version %>",
       deps: deps]
    end


  end

  defp do_generate(app, mod, path, opts) do
    assigns = [app: app, mod: mod, otp_app: otp_app(mod, !!opts[:sup]),
               version: get_version(System.version)]

    create_file "README.md",  readme_template(assigns)
    create_file ".gitignore", gitignore_text
