mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
17 lines
492 B
Bash
Executable file
17 lines
492 B
Bash
Executable file
#!/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
|
|
|