Skip to content

Commit

Permalink
update package script
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsumoto-ren committed Mar 17, 2024
1 parent c15acf7 commit c002927
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions package.sh
100644 → 100755
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" \
"$@"

0 comments on commit c002927

Please sign in to comment.