Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ bot.db
xdcs/*
bot-data/*
import/*
**/__pycache__/*
**/__pycache__/*
dist/
13 changes: 9 additions & 4 deletions frontend/create_xdc.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
#!/bin/sh
mkdir -p ../bot-data

: "${DESTDIR:=$PWD/..}"

DESTDIR="$DESTDIR/bot-data"

mkdir -p "$DESTDIR"
cd dist

echo "Building appstore.xdc"
cd shop
mv shop.html index.html
cp ../../build-files/shop/* .
zip -9 --recurse-paths "appstore.xdc" *
cp appstore.xdc ../../../bot-data
cp appstore.xdc "$DESTDIR"
cd ..

echo "Building submit-helper.xdc"
cd submit
mv submit.html index.html
cp ../../build-files/submit/* .
zip -9 --recurse-paths "submit-helper.xdc" *
cp submit-helper.xdc ../../../bot-data
cp submit-helper.xdc "$DESTDIR"
cd ..

echo "Building review-helper.xdc"
cd review
mv review.html index.html
cp ../../build-files/review/* .
zip -9 --recurse-paths "review-helper.xdc" *
cp review-helper.xdc ../../../bot-data
cp review-helper.xdc "$DESTDIR"
cd ..
28 changes: 28 additions & 0 deletions scripts/dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
#
# Script to create the distribution tarball.
set -e

SRC="$PWD"

TMP="$(mktemp -d)"
export DESTDIR="$TMP/appstore-bot"
mkdir "$DESTDIR"

# Build the frontend.
cd "$SRC/frontend"
npm run build

# Build the backend.
cd "$SRC"
cargo build --release

cp target/release/github-bot "$DESTDIR/appstore-bot"

mkdir -p "$SRC/dist"
OUT="$SRC/dist/appstore-bot.tar.gz"
tar -C "$TMP" -czf "$OUT" appstore-bot

echo Distribution tarball is built at $OUT >&2

rm -fr "$TMP"