Skip to content

Instantly share code, notes, and snippets.

@Belphemur
Last active September 14, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Belphemur/7e1b5da349e12c42eee7 to your computer and use it in GitHub Desktop.
Save Belphemur/7e1b5da349e12c42eee7 to your computer and use it in GitHub Desktop.
AppVeyor + AutoTagging + Git + C#
#! /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
#! /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
#!/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