Last active
September 14, 2015 14:16
-
-
Save Belphemur/7e1b5da349e12c42eee7 to your computer and use it in GitHub Desktop.
AppVeyor + AutoTagging + Git + C#
This file contains hidden or 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
#! /bin/bash | |
basedir="$(dirname "$0")" | |
. $basedir/version.sh | |
if [ "$version" != "" ]; then | |
git tag -a "v$version" -m "`git log -1 --format=%s`" | |
echo "Created a new tag, v$version" | |
fi |
This file contains hidden or 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
#! /bin/bash | |
basedir="$(dirname "$0")" | |
. $basedir/version.sh | |
if [ "$version" != "" ]; then | |
sed -i "1s/.*/version: ${version}.{build}/" $TOP_LVL/appveyor.yml | |
git add $TOP_LVL/appveyor.yml | |
echo "Modified AppVeyor config version, v$version" | |
fi |
This file contains hidden or 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
#!/bin/bash | |
export ASSEMBLY_FILE='SoundSwitch/Properties/AssemblyInfo.cs' | |
export TOP_LVL="$(git rev-parse --show-toplevel)" | |
export version=`git diff HEAD^..HEAD -- $TOP_LVL/$ASSEMBLY_FILE | \ | |
grep "assembly: AssemblyVersion" | sed -s 's/[^0-9\.]//g'| sed 's/.$//' | tail -1` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment