Skip to content

Instantly share code, notes, and snippets.

@Belphemur

Belphemur/post-commit

Last active Sep 14, 2015
Embed
What would you like to do?
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