mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[internal] update hooks to remove automated tagging
* Also update AppVeyor builds wrt the above
This commit is contained in:
parent
bc6e23ec11
commit
6d7a938058
5 changed files with 16 additions and 54 deletions
|
@ -16,28 +16,26 @@ if [ -x ./_detect-amend.sh ]; then
|
|||
. ./_detect-amend.sh
|
||||
fi
|
||||
|
||||
TAGVER=`git rev-list HEAD --count`
|
||||
BUILD=`git rev-list HEAD --count`
|
||||
# adjust so that we match the github commit count
|
||||
((TAGVER++))
|
||||
((BUILD++))
|
||||
# there may be a better way to prevent improper micro on amend. For now the detection
|
||||
# of a .amend file in the current directory will do
|
||||
if [ -f ./.amend ]; then
|
||||
((TAGVER--))
|
||||
git tag -d "b$TAGVER"
|
||||
((BUILD--))
|
||||
rm ./.amend;
|
||||
fi
|
||||
echo "setting micro to $TAGVER"
|
||||
echo $TAGVER > .tag
|
||||
echo "setting micro to $BUILD"
|
||||
|
||||
cat > cmd.sed <<\_EOF
|
||||
s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@TAGVER@@,\6/
|
||||
s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@TAGVER@@"/
|
||||
s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@TAGVER@@"\3/
|
||||
s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@TAGVER@@.\4"\5/
|
||||
s/^\([ \t]*\)*\(FILE\|PRODUCT\)VERSION\([ \t]*\)\([0-9]*\),\([0-9]*\),[0-9]*,\(.*\)/\1\2VERSION\3\4,\5,@@BUILD@@,\6/
|
||||
s/^\([ \t]*\)VALUE\([ \t]*\)"\(File\|Product\)Version",\([ \t]*\)"\(.*\)\..*"[ \t]*/\1VALUE\2"\3Version",\4"\5.@@BUILD@@"/
|
||||
s/^\(.*\)"Rufus \(.*\)\..*"\(.*\)/\1"Rufus \2.@@BUILD@@"\3/
|
||||
s/^\([ \t]*\)Version="\([0-9]*\)\.\([0-9]*\)\.[0-9]*\.\([0-9]*\)"\(.*\)/\1Version="\2.\3.@@BUILD@@.\4"\5/
|
||||
_EOF
|
||||
|
||||
# First run sed to substitute our variable in the sed command file
|
||||
sed -i -e "s/@@TAGVER@@/$TAGVER/g" cmd.sed
|
||||
sed -i -e "s/@@BUILD@@/$BUILD/g" cmd.sed
|
||||
# Run sed to update the nano version
|
||||
sed -b -i -f cmd.sed src/rufus.rc
|
||||
# NB: we need to run git add else the modified files may be ignored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue