-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
require file for releases off master
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |