📦 build: add a build script just so that everything is in consistent paths
parent
20ee11b4f8
commit
efc90ea29a
|
@ -3,5 +3,6 @@
|
||||||
/ptth_server.toml
|
/ptth_server.toml
|
||||||
/ptth_relay.toml
|
/ptth_relay.toml
|
||||||
/ptth_build_L6KLMVS6/
|
/ptth_build_L6KLMVS6/
|
||||||
|
/ptth_server_build_BIHWLQXQ/
|
||||||
/scraper-secret.txt
|
/scraper-secret.txt
|
||||||
/target
|
/target
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Use: ./build.bash
|
||||||
|
|
||||||
|
# Makes a release build of ptth_server and packages all necessary files
|
||||||
|
# such as images, Handlebars templates, etc.
|
||||||
|
|
||||||
|
# This script is version-specific. If you need to build an old version,
|
||||||
|
# check out that version from Git and call the old version of this
|
||||||
|
# script. This can be automated with `git archive`.
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
TEMP_GIBBERISH="ptth_server_build_BIHWLQXQ"
|
||||||
|
DEST="$TEMP_GIBBERISH/ptth"
|
||||||
|
|
||||||
|
mkdir "$TEMP_GIBBERISH"
|
||||||
|
mkdir "$DEST"
|
||||||
|
|
||||||
|
cargo build --release -p ptth_server
|
||||||
|
|
||||||
|
cp target/release/ptth_server "$DEST/ptth_server"
|
||||||
|
mkdir -p "$DEST/handlebars/server"
|
||||||
|
rsync -rv handlebars/server/ "$DEST/handlebars/server/"
|
||||||
|
|
||||||
|
pushd "$TEMP_GIBBERISH" > /dev/null
|
||||||
|
tar -cvzf "ptth_$(date +%Y_%m%b_%d).tar.gz" ptth/
|
||||||
|
popd > /dev/null
|
Loading…
Reference in New Issue