github.com/stffabi/git-lfs@v2.3.5-0.20180214015214-8eeaa8d88902+incompatible/script/update-version (about) 1 #!/usr/bin/env bash 2 3 VERSION_STRING=$1 4 VERSION_ARRAY=( ${VERSION_STRING//./ } ) 5 VERSION_MAJOR=${VERSION_ARRAY[0]} 6 VERSION_MINOR=${VERSION_ARRAY[1]} 7 VERSION_PATCH=${VERSION_ARRAY[2]:-0} 8 VERSION_BUILD=${VERSION_ARRAY[3]:-0} 9 10 # Update the version number git-lfs is reporting. 11 sed -i "s,\(Version = \"\).*\(\"\),\1$VERSION_STRING\2," config/version.go 12 13 # Update the version number in the RPM package. 14 sed -i "s,\(Version:[[:space:]]*\).*,\1$VERSION_STRING," rpm/SPECS/git-lfs.spec 15 16 # Update the version numbers in the Windows installer. 17 sed -i "s,\(\"Major\": \).*\,,\1$VERSION_MAJOR\,," versioninfo.json 18 sed -i "s,\(\"Minor\": \).*\,,\1$VERSION_MINOR\,," versioninfo.json 19 sed -i "s,\(\"Patch\": \).*\,,\1$VERSION_PATCH\,," versioninfo.json 20 sed -i "s,\(\"Build\": \).*,\1$VERSION_BUILD," versioninfo.json 21 sed -i "s,\(\"ProductVersion\": \"\).*\(\"\),\1$VERSION_STRING\2," versioninfo.json