-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Option to generate releases with snapshot numbers
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
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,15 @@ | ||
#!/bin/bash | ||
|
||
# See https://reproducible-builds.org/specs/source-date-epoch/ | ||
# get SOURCE_DATE_EPOCH with UNIX time_t | ||
if [ -d ".git" ]; | ||
then | ||
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) | ||
else | ||
echo "Error: intended for use from within a git repository" | ||
exit 1 | ||
fi | ||
MRPT_SNAPSHOT_VERSION=$(date -d @$SOURCE_DATE_EPOCH +%Y%m%d-%H%M) | ||
|
||
MRPT_SNAPSHOT_VERSION+="-git-" | ||
MRPT_SNAPSHOT_VERSION+=`git rev-parse --short=8 HEAD` |
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