forked from SCADA-LTS/Scada-LTS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathversion.sh
More file actions
executable file
·27 lines (26 loc) · 946 Bytes
/
version.sh
File metadata and controls
executable file
·27 lines (26 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
if [[ ($# < 6) || ($# > 7) ]]; then
echo "Illegal number of parameters" >&2
exit 2
fi
versionfile="./webapp-resources/version.properties"
milestone=$1
build=$2
branch=$3
commit=$4
actor=$5
if [[ $# -eq 6 ]]; then
pullRequestBranch=$6
fi
echo "******************************************************"
echo "**** Scada-LTS System Settings Build Information ****"
echo "******************************************************"
echo "Current build version: $milestone.$build"
echo "Build from GitHub branch: $branch"
echo "Build from GitHub commit: $commit"
echo "Initiated by: $actor"
echo "GitHub PullRequest branch: $pullRequestBranch"
sed -i "/slts.version.number=/c\slts.version.number=$milestone" $versionfile
sed -i "/slts.version.build=/c\slts.version.build=$build" $versionfile
sed -i "/slts.version.commit=/c\slts.version.commit=$commit" $versionfile
sed -i "/slts.version.branch=/c\slts.version.branch=$branch" $versionfile