-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmake-release.sh
More file actions
executable file
·37 lines (30 loc) · 995 Bytes
/
make-release.sh
File metadata and controls
executable file
·37 lines (30 loc) · 995 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
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# SPDX-License-Identifier: MIT
# Release checklist:
# * Bump version in package.json
# * Run ./make-release.sh, which will also update package-lock.json
# * git add package.json package-lock.json
# * git commit -m "Bump version to x.y.z"
# * git push
# * git tag -sm "Release x.y.z" x.y.z
# * git push origin x.y.z
set -e
cd "$(dirname "$0")"
version="$(jq -r <package.json .version)"
if [ -z "$version" ]; then
echo "Failed to retrieve version" 2>&1
exit 1
fi
echo "Building release for dpwebadmin-$version"
set -x
echo 'REACT_APP_APIROOT=/admin/api
REACT_APP_BASENAME=/admin
PUBLIC_URL=/admin' >.env.local
rm -rf build node_modules "dpwebadmin-$version" "dpwebadmin-$version.tar.gz"
./build-docker.sh
mv build "dpwebadmin-$version"
tar czf "dpwebadmin-$version.tar.gz" "dpwebadmin-$version" \
--owner=0 --group=0 --no-same-owner --no-same-permissions --numeric-owner
tar tvf "dpwebadmin-$version.tar.gz"
set +x
echo "Done building release for dpwebadmin-$version"