Skip to content

Commit

Permalink
require file for releases off master
Browse files Browse the repository at this point in the history
  • Loading branch information
kensipe committed Nov 26, 2018
1 parent d135ecc commit 8d6c6b9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Version script for Metronome.
#
# Change MINOR to x+1 and BRANCH_POINT to commit hash of common ancestor of master and releases/0.x
# after a releases/0.x was cut
MAJOR=0
MINOR=4
#BRANCH_POINT=cf053c5cb8b949690c5f9798fb27cbd34343c959

# Infer version
# Number of commits since branch point
#COMMIT_NUMBER="$(git rev-list --count --first-parent $BRANCH_POINT..HEAD)"
COMMIT_NUMBER=5
COMMIT_HASH=$(git rev-parse --short HEAD)

# Echo commit hash
if [ "$#" -eq 1 ] && [ "$1" == "commit" ]; then
echo "$COMMIT_HASH"
exit 0
fi

# Echo verion
# E.g. 0.5.42
echo "$MAJOR.$MINOR.$COMMIT_NUMBER"

0 comments on commit 8d6c6b9

Please sign in to comment.