-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·37 lines (28 loc) · 855 Bytes
/
build.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
37
#!/bin/bash
set -e
BASE_DIR="$(pwd)"
# Config
declare -i RUN_GENERATOR=${RUN_GENERATOR:-1}
echo "::group::Testing signing..."
echo "Testing signing" | gpg --sign --armor
echo "::endgroup::"
if [[ ${RUN_GENERATOR} -gt 0 ]]; then
if [[ ! -d generator/node_modules ]]; then
echo "::group::Running npm ci"
cd generator
npm ci
cd "${BASE_DIR}"
echo "::endgroup::"
fi
echo "::group::Running package generator"
rm -rf generated packages || true
node generator/generate.js
echo "::endgroup::"
fi
cd "${BASE_DIR}"
echo "::group::Packages that will be built..."
find generated -mindepth 3 -maxdepth 3 -type d
echo "::endgroup::"
echo "Now build and sign packages in parallel..."
find generated -mindepth 3 -maxdepth 3 -type d | tr -s "/" '\n' | parallel -N 4 ./debuild.sh {2} {3} {4}
echo "Done building (signed) packages."