Skip to content

Commit 8a76df1

Browse files
committed
build extension for each store
1 parent 05339e6 commit 8a76df1

1 file changed

Lines changed: 23 additions & 7 deletions

File tree

script/stores_build.sh

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,42 @@
11
#!/bin/bash
22

3-
stores_build() {
4-
echo 'building app for Chrome & Firefox Stores'
3+
chrome_build() {
4+
echo 'building app for Chrome'
55

66
rm -rf dist/*
7+
rm -f chrome_extension.zip
78

89
export INLINE_RUNTIME_CHUNK=false
910
export GENERATE_SOURCEMAP=false
11+
12+
yarn build
13+
14+
mkdir -p dist
15+
cp -r build/* dist
16+
echo 'zipping the dist'
17+
cd dist/ && zip -r ../chrome_extension.zip * -x "*.DS_Store" && cd ..
18+
}
19+
20+
firefox_build() {
21+
echo 'building app for Firefox'
1022

23+
rm -rf dist/*
1124
rm -f source_code.zip
12-
rm -f extension.zip
13-
25+
rm -f firefox_extension.zip
26+
27+
export INLINE_RUNTIME_CHUNK=false
28+
export GENERATE_SOURCEMAP=false
29+
1430
yarn global add @craco/craco
1531
craco build
1632

1733
mkdir -p dist
1834
cp -r build/* dist
1935
echo 'zipping the dist'
20-
cd dist/ && zip -r ../extension.zip * -x "*.DS_Store" && cd ..
36+
cd dist/ && zip -r ../firefox_extension.zip * -x "*.DS_Store" && cd ..
2137

2238
echo 'zipping the source code for Firefox'
2339
zip -r source_code.zip 'public/' 'script/' 'src' 'LICENSE' 'package.json' 'yarn.lock' 'README.md' 'craco.config.js' '.env' -x "*.DS_Store"
2440
}
25-
26-
stores_build
41+
chrome_build
42+
firefox_build

0 commit comments

Comments
 (0)