mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-19 09:30:58 +02:00
Added INCH=25.4 constant.
This commit is contained in:
18
scripts/increment_version.sh
Executable file
18
scripts/increment_version.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERFILE="version.scad"
|
||||
|
||||
vernums=$(grep ^BOSL_VERSION "$VERFILE" | sed 's/^.*[[]\([0-9,]*\)[]].*$/\1/')
|
||||
major=$(echo "$vernums" | awk -F, '{print $1}')
|
||||
minor=$(echo "$vernums" | awk -F, '{print $2}')
|
||||
revision=$(echo "$vernums" | awk -F, '{print $3}')
|
||||
|
||||
newrev=$(($revision+1))
|
||||
echo "Current Version: $major.$minor.$revision"
|
||||
echo "New Version: $major.$minor.$newrev"
|
||||
|
||||
sed -i '' 's/^BOSL_VERSION = .*$/BOSL_VERSION = ['"$major,$minor,$newrev];/g" $VERFILE
|
||||
|
||||
exec git add version.scad
|
||||
exec git commit -m "Bump minor version."
|
||||
|
Reference in New Issue
Block a user