Improve script to prepare for flatpak release
This commit is contained in:
parent
02a296dcdf
commit
942891248d
|
@ -1,12 +1,20 @@
|
||||||
# Usage ./build-flatpak.sh
|
# Usage ./build-flatpak.sh
|
||||||
|
|
||||||
# First run `cargo vendor` and add the output to ~/.cargo/config.toml
|
# download and save the vendored crates
|
||||||
|
mkdir .cargo
|
||||||
|
cargo vendor >> .cargo/config.toml
|
||||||
|
|
||||||
|
# get the current version for the file name
|
||||||
VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name | test("lemoa")) | .version')
|
VERSION=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name | test("lemoa")) | .version')
|
||||||
|
|
||||||
rm -rf target _build build builddir
|
rm -rf target _build build builddir
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
# archive the source code and vendored crates to a tar.xz
|
||||||
tar cfJ "lemoa-$VERSION.tar.xz" lemoa
|
tar cfJ "lemoa-$VERSION.tar.xz" lemoa
|
||||||
sha256sum "lemoa-$VERSION.tar.xz"
|
sha256sum "lemoa-$VERSION.tar.xz" | cut -d ' ' -f 1
|
||||||
|
|
||||||
|
# cleanup
|
||||||
cd lemoa
|
cd lemoa
|
||||||
git reset --hard &> /dev/null
|
git reset --hard &> /dev/null
|
||||||
rm -rf vendor .cargo
|
rm -rf vendor .cargo
|
Loading…
Reference in New Issue