-
Notifications
You must be signed in to change notification settings - Fork 41
/
bump-tag-versions.sh
executable file
·36 lines (32 loc) · 1.14 KB
/
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
30
31
32
33
34
35
36
#!/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' 'frontend-collector')
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"
eval "npm audit fix"
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 "npm install"
eval "cd .."
done
eval "npm install --no-audit"
eval "npm audit fix"
echo "Auditing dependencies ..."
eval "npm run audit"
eval "npm install --no-audit"
echo "Generating environment variables documentation in docs folder..."
bash update-docs.sh