Skip to content
This repository was archived by the owner on Aug 15, 2023. It is now read-only.

Commit ca80437

Browse files
committed
chore(workspace): extension reviewer install from zip, closes #649 (#677)
1 parent 6688017 commit ca80437

File tree

3 files changed

+59
-22
lines changed

3 files changed

+59
-22
lines changed

Diff for: .github/workflows/daily_release.yml

+18-3
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,40 @@ jobs:
2727
uses: actions/setup-node@v2
2828
with:
2929
node-version: ${{ matrix.node-version }}
30-
cache: "yarn"
30+
cache: 'yarn'
3131
cache-dependency-path: yarn.lock
3232

3333
- name: Install dependencies
3434
run: yarn
3535

36+
- name: Shrink to zip
37+
run: |
38+
./scripts/shrink.sh
39+
pwd
40+
cd ./build
41+
pwd
42+
unzip -o ./trex.zip -d ./
43+
ls -la
44+
yarn
45+
yarn tk:ext dist
46+
ls -l platforms/tktrex/extension/dist/*.zip
47+
yarn yt:ext dist
48+
ls -l platforms/yttrex/extension/dist/*.zip
49+
yarn ycai build
50+
ls -l platforms/ycai/studio/build/extension/*.zip
51+
3652
# - name: Test project
3753
# run: yarn test
3854

3955
- name: Build Dashboard
4056
env:
4157
DOTENV_CONFIG_PATH: .env.beta
42-
DEBUG: "@trex*,@YCAI*"
58+
DEBUG: '@trex*,@YCAI*'
4359
run: yarn ycai build
4460

4561
- name: Release Version
4662
run: yarn release-it --no-github.release --release-version
4763

48-
4964
- name: Deploy YCAI Dashboard
5065
uses: burnett01/[email protected]
5166
with:

Diff for: scripts/install-from-shrinkzip.sh

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
#!/usr/bin/bash
22

3-
set -x
3+
set -ex
44

55
# This script is necessary to produce the .zip files to submit to mozilla store
66
# Otherwise the repo is too big
77

8-
out=../trex-from-zip
8+
from=${1:-./build/trex.zip}
9+
out=${2:-./build}
910

1011
mkdir -p $out
1112

1213
# cp ./build/trex.zip $out/
1314

14-
unzip -o -d $out build/trex.zip
15+
unzip -o -d $out $from
1516

1617
cd $out || exit
1718

19+
ls -la
20+
1821
yarn install
1922

20-
yarn tk:ext build
21-
yarn yt:ext build
23+
yarn tk:ext dist
24+
ls -l platforms/tktrex/extension/dist/*.zip
25+
yarn yt:ext dist
26+
ls -l platforms/yttrex/extension/dist/*.zip
2227
yarn ycai build
28+
ls -l platforms/ycai/studio/build/extension/*.zip
29+

Diff for: scripts/shrink.sh

+29-14
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ mkdir -p build;
2121
# exit;
2222
# fi
2323

24-
# this is the biggest cache
25-
echo "Removing .yarn/cache"
26-
# rm -rf .yarn/cache
24+
suffix=$('grep version package.json | sed -es/.*:// | sed -es/[\ \",]//g')
25+
fileout="build/trex${suffix}.zip"
26+
echo "zipping in $fileout"
2727

2828
# this should not be present anyways
2929
echo "Removing node_modules"
@@ -34,17 +34,25 @@ echo "Removing test files and unnecessary folders"
3434
# rm -rf platforms/*/backend
3535

3636
echo "Creating new version of README for extension reviewer"
37-
echo -e "### Extension reviewer TODOs\n\n yarn\n yarn tk:ext dist\n ls -l platforms/tktrex/extension/dist/*.zip\n yarn yt:ext dist\n ls -l platforms/yttrex/extension/dist/*.zip\n yarn ycai build\n ls -l platforms/ycai/studio/build/extension/*.zip\n\n" > README.md
38-
echo "tktrex is tiktok.tracking.exposed extension" >> README.md
39-
echo "yttrex is youtube.tracking.exposed extension" >> README.md
40-
echo "ycai is youchoose.ai extension" >> README.md
37+
echo -e "## Extension reviewer TODOs\n\n" > TODO.md
38+
echo -e 'Place the `trex.zip` in a folder an unzip it \n' >> TODO.md
39+
echo -e "### Requirements\n" >> TODO.md
40+
echo -e '- yarn `v3`\n - node `16` \n' >> TODO.md
41+
echo -e "#### Installation \n" >> TODO.md
42+
echo -e 'Install dependencies\n' >> TODO.md
43+
echo -e '```bash\nyarn\n```\n' >> TODO.md
44+
echo -e "tktrex is tiktok.tracking.exposed extension\n" >> TODO.md
45+
echo -e '```bash\nyarn tk:ext dist\nls -l platforms/tktrex/extension/dist/*.zip\n```\n' >> TODO.md
46+
echo -e "yttrex is youtube.tracking.exposed extension\n" >> TODO.md
47+
echo -e '```bash\nyarn yt:ext dist\nls -l platforms/yttrex/extension/dist/*.zip\n```\n' >> TODO.md
48+
echo -e "ycai is youchoose.ai extension\n" >> TODO.md
49+
echo -e '```bash\nyarn ycai build\nls -l platforms/ycai/studio/build/extension/*.zip\n```\n' >> TODO.md
4150

42-
suffix=$('grep version package.json | sed -es/.*:// | sed -es/[\ \",]//g')
43-
fileout="build/trex${suffix}.zip"
44-
echo "zipping in $fileout"
51+
mv README.md .README.md
52+
mv TODO.md README.md
4553

4654
zip $fileout -r ./* \
47-
.npmrc .nvmrc .yarn .yarnrc.yml \
55+
.npmrc .nvmrc .yarn .yarnrc.yml \
4856
-x "yarn.lock" \
4957
-x ".yarn/unplugged/**" \
5058
-x ".yarn/cache/**" \
@@ -56,12 +64,19 @@ zip $fileout -r ./* \
5664
-x "**/__tests__/**" \
5765
-x "docs/**" -x "**/docs/**" \
5866
-x "coverage/**" -x "**/coverage/**" \
67+
-x "downloads/**" -x "**/downloads/**" \
68+
-x "logs/**" -x "**/logs/**" \
5969
-x "docker/**" \
6070
-x "build/**" -x "**/build/**" \
71+
-x "scripts/**" -x "**/scripts/**" \
72+
-x "packages/taboule/**" \
6173
-x "platforms/guardoni/**" \
62-
-x "platforms/tktrex/observatory/**" \
63-
-x "platforms/tktrex/ua-observatory/**" \
64-
-x "platforms/tktrex/tt-automate/**" \
6574
-x "platforms/*/backend/**" \
75+
-x "platforms/*/backend/**" \
76+
77+
zip $fileout scripts/install-from-shrinkzip.sh
78+
79+
rm README.md
80+
mv .README.md README.md
6681

6782
echo "done!"

0 commit comments

Comments
 (0)