Skip to content

Commit a5a26ed

Browse files
asequesJoan
andauthored
fix: Improve build.sh to pass shelcheck (#10811)
* fix: Improve build.sh to pass shelcheck * Use new version scheme on build.sh example --------- Co-authored-by: Joan <joan.juvanteny@bassolsenergia.com>
1 parent 4fd522c commit a5a26ed

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

build.sh

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,37 @@
1414
# use `printing-bundle` to build also the zip bundle
1515
#
1616
# Example
17-
# $ ./build.sh 2022.02.00 binary
17+
# $ ./build.sh v2024.02.02 binary
1818

19+
set -u
1920
set -e
2021

2122
echo "Running NPM install to update dependencies"
22-
echo `date`
23+
date
2324
npm install
2425

2526
echo "Building MS2 bundles"
26-
echo `date`
27+
date
2728
npm run fe:build
2829

2930
echo "Cleanup Documentation"
30-
echo `date`
31+
date
3132
npm run jsdoc:clean
3233

3334
echo "Checking syntax"
34-
echo `date`
35+
date
3536
npm run lint
3637

3738
echo "Run MapStore2 tests"
38-
echo `date`
39+
date
3940
npm test
4041

4142
echo "Creating Documentation"
42-
echo `date`
43+
date
4344
npm run jsdoc:build
4445

4546
echo "Building final WAR package"
46-
echo `date`
47+
date
4748
if [ $# -eq 0 ]
4849
then
4950
cd java
@@ -55,14 +56,14 @@ if [ $# -eq 0 ]
5556
cd java
5657
mvn clean install
5758
cd ..
58-
mvn clean install -Dmapstore2.version=$1
59+
mvn clean install -Dmapstore2.version="$1"
5960
else
6061
cd java
61-
mvn clean install -Dmapstore2.version=$1 -P$2
62+
mvn clean install -Dmapstore2.version="$1" -P"$2"
6263
cd ..
63-
mvn clean install -Dmapstore2.version=$1 -P$2
64+
mvn clean install -Dmapstore2.version="$1" -P"$2"
6465
fi
6566

6667
echo "Final Cleanup"
67-
echo `date`
68+
date
6869
npm run jsdoc:clean

0 commit comments

Comments
 (0)