forked from openkfw/TruBudget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bump-tag-versions.sh
29 lines (26 loc) · 953 Bytes
/
bump-tag-versions.sh
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
28
29
#!/bin/bash
# example: bash bump-tag-versions.sh 1.0.0
trubudget_version=$1
if [ -z ${trubudget_version} ]; then
echo "Usage: bash bump-tag-versions.sh [TAG-VERSION]"
echo "Example: bash bump-tag-versions.sh 1.0.0"
exit 0
fi
trubudget_projects=('frontend' 'api' 'blockchain' 'e2e-test' 'provisioning' 'excel-export-service' 'email-notification-service' 'storage-service')
for project in "${trubudget_projects[@]}"; do
eval "cd $project"
echo "Bumping $project ..."
eval "perl -pi -e 's/\"version\": .*/\"version\": \"$trubudget_version\",/' ./package.json"
eval "npm install --no-audit"
if [ $project == frontend ]; then
echo "Auditing only production dependencies ..."
eval "npm run audit -- --production"
else
echo "Auditing all dependencies ..."
eval "npm run audit"
fi
eval "cd .."
done
eval "npm install --no-audit"
echo "Auditing dependencies ..."
eval "npm run audit"