-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
52 lines (36 loc) · 938 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
# Create version string.
VERS=`date +%s`
CERT="cert.p12"
KEY="bmVa6j7JhZ4H8d2jwYU6wTeN"
NAME="ai-brander"
COUNTRY="US"
CITY="Richmond"
ORG="Atomic Lotus, LLC"
DOMAIN="atomiclotus.net"
# Use these two lines to run a Gulp task or tasks and wait for completion.
# gulp host client
# wait $!
# If the `build` directory exists, delete it.
if [ -d build ]; then
rm -Rf build
fi
if [ -d dist ]; then
rm -Rf dist/*
fi
if [ ! -d dist ]; then
mkdir dist
fi
# Create a clean build directory.
mkdir build
# Copy source code to build directory.
cp -R client build/client
cp -R csxs build/csxs
cp -R host build/host
# Build and sign the extension.
./bin/ZXPSignCmd -selfSignedCert $COUNTRY $CITY "$ORG" $DOMAIN $KEY ./bin/$CERT
./bin/ZXPSignCmd -sign build dist/$NAME-$VERS.zxp ./bin/$CERT $KEY -tsa https://www.safestamper.com/tsa
# Delete the build directory.
if [ -d build ]; then
rm -Rf build
fi