Fix build release client

This commit is contained in:
Adrian Woźniak 2021-01-07 09:13:13 +01:00
parent 0c62a41f70
commit c3653ebe2a
3 changed files with 16 additions and 1 deletions

View File

@ -15,6 +15,7 @@ environment:
CI: true
secrets:
- 7ebab768-e5e4-4c9d-ba57-ec41a72c5665
- 46f739e5-4538-45dd-a79f-bf173b7a2ed9
tasks:
- setup: |
rustup toolchain install nightly
@ -31,5 +32,7 @@ tasks:
export TAR_NAME=$(date -u +"%Y%m%d%H%M%s")
tar -cJvf ~/${TAR_NAME}.tar.xz ./build
cp ~/${TAR_NAME}.tar.xz ~/latest.tar.xz
scp ~/latest.tar.xz rpi.ita-prog.pl:/www/http/static/jirs-client-{TAR_NAME}.tar.xz
scp ~/latest.tar.xz rpi.ita-prog.pl:/www/http/static/jirs-client-latest.tar.xz
artifacts:
- latest.tar.gz

View File

@ -16,6 +16,7 @@ environment:
JIRS_SERVER_BIND: 0.0.0.0
secrets:
- 7ebab768-e5e4-4c9d-ba57-ec41a72c5665
- 46f739e5-4538-45dd-a79f-bf173b7a2ed9
tasks:
- build_config: |
cp ~/jirs/.builds/db.toml ~/jirs/jirs-server/db.toml
@ -42,5 +43,7 @@ tasks:
tar -cJvf ~/server.tar.xz ./target/release/jirs_server
- deploy: |
cp ~/server.tar.xz ~/latest.tar.xz
scp ~/latest.tar.xz rpi.ita-prog.pl:/www/http/static/jirs-server-{TAR_NAME}.tar.xz
scp ~/latest.tar.xz rpi.ita-prog.pl:/www/http/static/jirs-server-latest.tar.xz
artifacts:
- jirs_server

View File

@ -1,5 +1,14 @@
#!/usr/bin/env bash
export PROJECT_ROOT=$(git rev-parse --show-toplevel)
export CLIENT_ROOT=${PROJECT_ROOT}/jirs-client
export HI_ROOT=${PROJECT_ROOT}/highlight/jirs-highlight
export MODE=force
export BUILD_TYPE=--release
cd ${PROJECT_ROOT}
cargo build --bin jirs-css
. .env
rm -Rf build
@ -11,7 +20,7 @@ wasm-pack build --mode normal --release --out-name jirs --out-dir $CLIENT_ROOT/b
cd $HI_ROOT
wasm-pack build --mode normal --release --out-name hi --out-dir $CLIENT_ROOT/build --target web
cargo run --bin jirs-css -i ./js/styles.css -o ./build/styles.css
${PROJECT_ROOT}/target/debug/jirs-css -i ./js/styles.css -o ./build/styles.css
cp -r ./static/* ./build
cat ./static/index.js \