From c1646e20f6cbd711833cba1fb4fc6966d0035ee5 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 4 Oct 2023 11:44:23 -0400 Subject: [PATCH] Add script and CI to generate complete tarballs --- .build.yml | 6 +++++- build-flatpak.sh => scripts/build-flatpak.sh | 0 scripts/config.toml | 9 +++++++++ scripts/tarball.sh | 14 ++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) rename build-flatpak.sh => scripts/build-flatpak.sh (100%) create mode 100644 scripts/config.toml create mode 100755 scripts/tarball.sh diff --git a/.build.yml b/.build.yml index 180f2a8..3b4fb99 100644 --- a/.build.yml +++ b/.build.yml @@ -21,6 +21,9 @@ tasks: - reuse: | cd astra reuse lint + - tarball: | + cd astra + ./scripts/tarball.sh #- configure: | # cd astra # cmake -S . -B build-cmake @@ -30,6 +33,7 @@ tasks: #- flatpak: | # cd astra # ./build-flatpak.sh -#artifacts: +artifacts: + - astra-source.tar.gz # - astra/build-cmake/bin/astra # - astra/astra.flatpak \ No newline at end of file diff --git a/build-flatpak.sh b/scripts/build-flatpak.sh similarity index 100% rename from build-flatpak.sh rename to scripts/build-flatpak.sh diff --git a/scripts/config.toml b/scripts/config.toml new file mode 100644 index 0000000..f38bafe --- /dev/null +++ b/scripts/config.toml @@ -0,0 +1,9 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source."git+https://git.sr.ht/~redstrate/physis"] +git = "https://git.sr.ht/~redstrate/physis" +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "../../cargo-vendored" diff --git a/scripts/tarball.sh b/scripts/tarball.sh new file mode 100755 index 0000000..d2b57f9 --- /dev/null +++ b/scripts/tarball.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# ensure the submodules are up to date +git submodule init +git submodule update + +# begin vendoring cargo dependencies +cd external/libphysis +cargo vendor ../../cargo-vendored +mkdir .cargo +cp ../../scripts/config.toml .cargo/config.toml +cd ../../ + +tar --exclude='*build*' --exclude='.idea' --exclude='.clang-format' --exclude='astra-source.tar.gz' --exclude-vcs -zcvf astra-source.tar.gz .