improvements to generate-release-artifacts.sh

- better filename for the generated archive
- clean before build, always feels like a good idea
- always be sure to include the example site files, instead of doing it
  manually, post-run as i was doing before (and forgot to do for one
  of the releases ... oops ...)
This commit is contained in:
Gered 2023-07-11 12:59:22 -04:00
parent 7fab84f1cb
commit e4aa4afcec

View file

@ -1,9 +1,22 @@
#!/bin/bash
cd "$(dirname "$0")"
package_version=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)
current_target=$(rustc -vV | sed -n 's|host: ||p')
package_filename="pbe-v${package_version}-${current_target}.tar.gz"
rm -f ./artifacts/bin/pbe
rm -f ./artifacts/bin/syntax_to_css
cargo clean
cargo install --path . --root ./artifacts/
cargo install --path ./syntax_to_css/ --root ./artifacts/
cd ./artifacts/bin
tar -cvf ../../release.tar.gz ./pbe ./syntax_to_css
tar -cvf $package_filename \
example-site \
-C ./artifacts/bin \
pbe \
syntax_to_css
echo "Packaged release as ${package_filename}"