Skip to content

Commit

Permalink
Improve patch/unpatch logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nasser committed Feb 8, 2020
1 parent abaeb3e commit 636f6db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions Scripts/patch-assembly-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
# cd ../../
DIRTY=$([[ $(git diff --shortstat 2> /dev/null | tail -n1) != "" ]] && echo "*")
INFO=$(echo "(`git rev-parse --abbrev-ref HEAD`\/`git describe --always`$DIRTY `date`)")
# echo "$INFO"
sed -i-unpatched "s/AssemblyInformationalVersion.*/AssemblyInformationalVersion(\"$INFO\")]/g" Properties/AssemblyInfo.cs
sed -i "s/AssemblyInformationalVersion.*/AssemblyInformationalVersion(\"$INFO\")]/g" Properties/AssemblyInfo.cs
2 changes: 1 addition & 1 deletion Scripts/unpatch-assembly-info.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# unpatch AssemblyInfo
mv Properties/AssemblyInfo.cs-unpatched Properties/AssemblyInfo.cs
sed -i "s/AssemblyInformationalVersion.*/AssemblyInformationalVersion(\"\")]/g" Properties/AssemblyInfo.cs

0 comments on commit 636f6db

Please sign in to comment.