Last active
September 4, 2020 08:17
-
-
Save akovac35/07ea9cf03036a2a4119b8ece9f8decdd to your computer and use it in GitHub Desktop.
Revisions
-
akovac35 revised this gist
Sep 4, 2020 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,9 +4,6 @@ # This bash script will increase the last digit of all csproj files within the current # solution folder which contain version element. while read -r line ; do echo "Processing $line" # Need to use intermediate file because of perl locks -
akovac35 revised this gist
Sep 4, 2020 . No changes.There are no files selected for viewing
-
akovac35 revised this gist
Sep 4, 2020 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,9 @@ # Authors # Aleksander Kovač https://github.com/akovac35 # # This bash script will increase the last digit of all csproj files within the current # solution folder which contain version element. export PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/%/ {next} {print}' | sed 's/:*$//') # The following line will modify only the last digit of the version string -
akovac35 created this gist
Sep 4, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ export PATH=$(echo ${PATH} | awk -v RS=: -v ORS=: '/%/ {next} {print}' | sed 's/:*$//') # The following line will modify only the last digit of the version string while read -r line ; do echo "Processing $line" # Need to use intermediate file because of perl locks cp $line{,.bak} (perl -pe 's/^(\s*<Version>)((\d+\.)*)(\d+)(.*)$/$1.$2.($4+1).$5/e' < $line.bak) > $line rm $line.bak done < <(grep -ril --include \*.csproj -E "<Version>.+</Version>" ./)