Skip to content

Commit 3ca589f

Browse files
committed
Add package script
1 parent 8943f9b commit 3ca589f

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
TLBE*

package.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#! /bin/sh
2+
set -e
3+
4+
# Get the current name and version from info.json
5+
PACKAGE_NAME=$(jq -r .name info.json)
6+
PACKAGE_VERSION=$(jq -r .version info.json)
7+
PACKAGE_FULL_NAME=${PACKAGE_NAME}_${PACKAGE_VERSION}
8+
PACKAGE_FILE=${PACKAGE_FULL_NAME}.zip
9+
10+
echo Preparing $PACKAGE_FILE
11+
12+
# Find all files and folders that should be part of release (by excluding ones that should not)
13+
FILES=$(find . -maxdepth 1 -iname '*' -not -name "tests" -not -name ".*" -not -name "*.zip" -not -name "*.sh" -not -name "TLBE*")
14+
echo $FILES
15+
16+
mkdir -p ${PACKAGE_FULL_NAME}
17+
cp -r ${FILES} "${PACKAGE_FULL_NAME}"
18+
zip -r ${PACKAGE_FILE} "${PACKAGE_FULL_NAME}"
19+
echo ${PACKAGE_FULL_NAME} ready
20+

0 commit comments

Comments
 (0)