Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- defmodule MyApp.App.Mixfile do
- use Mix.Project
- def project do
- [
- app: :my_app,
- version: "0.0.1-#{sha()}",
- ...
- def sha do
- case System.cmd("git", ["rev-parse", "HEAD"]) do
- {tag, 0} ->
- String.trim(tag)
- _ ->
- "UNKNOWN"
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement