-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
c15acf7
commit c002927
Showing
1 changed file
with
5 additions
and
17 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,18 +1,6 @@ | ||
#!/usr/bin/env sh | ||
#!/bin/bash | ||
|
||
readonly ADDON_NAME=mergenotes | ||
readonly ROOT_DIR=$(git rev-parse --show-toplevel) | ||
readonly BRANCH=${1:-$(git branch --show-current)} | ||
readonly ZIP_NAME=${ADDON_NAME}_${BRANCH}.ankiaddon | ||
|
||
cd -- "$ROOT_DIR" || exit 1 | ||
export ROOT_DIR | ||
rm -- "$ZIP_NAME" 2>/dev/null || true | ||
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}.zip"' | ||
|
||
zipmerge "$ZIP_NAME" ./*.zip | ||
|
||
rm -- ./*.zip | ||
./ajt_common/package.sh \ | ||
--package "MergeNotes" \ | ||
--name "AJT Merge Notes" \ | ||
"$@" |