-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·20 lines (16 loc) · 858 Bytes
/
Copy pathpackage.sh
File metadata and controls
executable file
·20 lines (16 loc) · 858 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Packages the current code version into a zip archive, for uploading to Mozilla.
VERSION=`jq -r '.version' manifest.json` || { echo "Error: Failed to extract version from manifest.json"; exit 1; }
mkdir -p ./release
# Generate excluded files list from .gitignore.
# This code block works, but zip -x flag is broken on mac :(
# Leaving it here for later. For now, releases are just annoying.
# printf "%s" "\"./.git/*\" -x \"./.gitignore\"" > exclusions.txt
# cat .gitignore | while read -r line; do
# printf "%s" " -x \"./$line\"" >> exclusions.txt
# done
# zip -r release/$VERSION.zip ./ -x `cat exclusions.txt`
# rm exclusions.txt
OUT=release/resume_$VERSION.zip
git archive --format=zip -o $OUT HEAD
sha256sum $OUT
# For now, just go manually fix the archive. Boo. Apple is annoying. Now I am using a mac just for one program. That's no good.