Skip to content

Commit

Permalink
release script to build all platforms individually
Browse files Browse the repository at this point in the history
  • Loading branch information
trbKnl committed Jan 16, 2024
1 parent 61363a1 commit ea0fa6c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

release.zip
*.zip

# dependencies
/node_modules
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"start": "concurrently 'npm run start:py' 'npm run start:app'",
"build": "npm run build:py && npm run build:app && npm run build:css",
"archive": "cd build && zip -r ../release.zip .",
"archive_output": "cd build && zip -r ../release-$PLATFORM.zip .",
"release_platform": "npm run build && cd build && zip -r ../release-$PLATFORM.zip .",
"release": "npm run build && npm run archive",
"test": "react-scripts test",
"lint": "npm run fix:ts",
Expand Down
Binary file modified public/port-0.0.0-py3-none-any.whl
Binary file not shown.
19 changes: 13 additions & 6 deletions release-script.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#!/bin/bash

# release all individual platforms
script_location = ./src/framework/processing/py/port/script.py
# build release all individual platforms

all_platforms='platforms = \[ ("LinkedIn", extract_linkedin, linkedin.validate), ("Insta'
all_platforms_commented_out='#platforms = \[ ("LinkedIn", extract_linkedin, linkedin.validate), ("Insta'
script_location='./src/framework/processing/py/port/script.py'
single_platform='platforms = \[ ("'
single_platform_commented_out='#platforms = \[ ("'

# comment out all platforms in sequence
sed -i "s/$all_platforms/$all_platforms_commented_out/g" $script_location

platforms=("LinkedIn" "Instagram" "Chrome" "Facebook" "Youtube" "TikTok" "Twitter")
platforms=("LinkedIn")

for platform in "${platforms[@]}"; do
sed -i "s/$single_platform_commented_out$platform/$single_platform$platform/g" $script_location
PLATFORM=$platform npm run release_platform
git restore $script_location
done
Binary file modified src/framework/processing/py/dist/port-0.0.0-py3-none-any.whl
Binary file not shown.

0 comments on commit ea0fa6c

Please sign in to comment.