This repository has been archived by the owner on Aug 17, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7f3fcc3
commit 801b26a
Showing
1 changed file
with
7 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
#!/usr/bin/env bash | ||
|
||
readonly ADDON_NAME=ajt_furigana | ||
readonly ROOT_DIR=$(git rev-parse --show-toplevel) | ||
readonly BRANCH=$(git branch --show-current) | ||
readonly ARCHIVE=ajt_furigana_${BRANCH}.ankiaddon | ||
readonly BRANCH=${1:-$(git branch --show-current)} | ||
readonly ZIP_NAME=${ADDON_NAME}_${BRANCH}.ankiaddon | ||
|
||
cd -- "$ROOT_DIR" || exit 1 | ||
|
||
export ROOT_DIR BRANCH | ||
|
||
git archive HEAD --format=zip --output "$ARCHIVE" | ||
git archive "$BRANCH" --format=zip --output "$ZIP_NAME" | ||
|
||
# shellcheck disable=SC2016 | ||
git submodule foreach 'git archive HEAD --prefix=$path/ --format=zip --output "$ROOT_DIR/${path}_${BRANCH}.zip"' | ||
zipmerge "$ARCHIVE" ./*.zip | ||
|
||
zipmerge "$ZIP_NAME" ./*.zip | ||
rm -- ./*.zip |