You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
820 B

#!/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
export LC_ALL="C"
TEMP_GIBBERISH="ptth_server_build_BIHWLQXQ"
DEST="$TEMP_GIBBERISH/ptth"
rm -rf "$TEMP_GIBBERISH"
mkdir "$TEMP_GIBBERISH"
mkdir "$DEST"
cargo build --release -p ptth_multi_call_server
cp target/release/ptth_multi_call_server "$DEST/"
(
cd "$TEMP_GIBBERISH" || exit
find ptth/ -print0 | \
sort -z | \
tar --mtime='1970-01-01' --no-recursion --null -T - -cf - > \
ptth_server.tar.temp
mv ptth_server.tar.temp ptth_server.tar
)