Преглед на файлове

fix: Do not allow fallback in 'git describe' to get version string

theenglishway (time) преди 4 години
родител
ревизия
cd5049002b
променени са 2 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 2 0
      README.md
  2. 1 1
      priv/build/setup-git-hooks.sh

+ 2 - 0
README.md

@@ -34,6 +34,8 @@ This command is not really handy to run to get build metadata, though, because
 it requires the project to have been compiled at least once in `dev` mode. It is
 therefore more handy to read the VERSION file.
 
+Note : do not forget to push the tags onto the origin repository !
+
 ### PostgreSQL role
 
 In `dev` as well as in `prod` modes, the role used in `config/#{mode}.exs` must 

+ 1 - 1
priv/build/setup-git-hooks.sh

@@ -2,7 +2,7 @@
 # Install git hooks
 
 CHECK_FORMAT="mix format --check-formatted"
-WRITE_VERSION="git describe --always --tags --match "v*" | sed 's/^v//' | sed 's/-/+/2' > VERSION"
+WRITE_VERSION="git describe --tags --match "v*" | sed 's/^v//' | sed 's/-/+/2' > VERSION"
 
 cat <<EOF > .git/hooks/pre-commit
 #!/bin/sh