-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
2e58620
commit ba22628
Showing
6 changed files
with
61 additions
and
16 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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
1.2.1 | ||
1.2.2 |
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,23 @@ | ||
#! /usr/bin/env bash | ||
set -e | ||
set -o pipefail | ||
_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd)" | ||
cd $_dir | ||
|
||
set IFS= | ||
|
||
version_str=$(cat VERSION | xargs) | ||
version_header='src/Version.h' | ||
|
||
ver_maj=$(printf $version_str | sed -E -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/' | xargs) | ||
ver_min=$(printf $version_str | sed -E -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/' | xargs) | ||
ver_rev=$(printf $version_str | sed -E -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/' | xargs) | ||
|
||
git_commit=$(git rev-parse HEAD) | ||
echo "Version: $ver_maj.$ver_min.$ver_rev-$git_commit" | ||
|
||
sed -i -E -r "s/(#define BLADEBIT_VERSION_MAJ )([0-9]+)/\1$ver_maj/g" $version_header | ||
sed -i -E -r "s/(#define BLADEBIT_VERSION_MIN )([0-9]+)/\1$ver_min/g" $version_header | ||
sed -i -E -r "s/(#define BLADEBIT_VERSION_REV )([0-9]+)/\1$ver_rev/g" $version_header | ||
sed -i -E -r "s/(#define BLADEBIT_GIT_COMMIT )(.+)/\1\"$git_commit\"/g" $version_header | ||
|
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
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