diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2020-09-30 22:18:09 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2020-10-01 09:46:03 +0200 |
commit | a5a5804abb2b9b2c15039403fbbab80b6883f275 (patch) | |
tree | f6bf704fe46b0c45c72221699a00344e0ba8200f /ci | |
parent | 3c33c79548874e97a3553bf6943c89638326e6f2 (diff) | |
download | ccache-a5a5804abb2b9b2c15039403fbbab80b6883f275.tar.gz |
Simplify source package generation
Since it now works to build from “git archive” archives, use such an
archive as the official source code release archive instead of using
CPack with a custom install script for modifying the source code. We can
revisit this in the future when and if we want a source code release
archive that is not simply an export of the version-controlled source
code.
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/build-and-verify-source-package (renamed from ci/build-and-verify-package-source) | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/ci/build-and-verify-package-source b/ci/build-and-verify-source-package index d7f5f0ce..5a212c2f 100755 --- a/ci/build-and-verify-package-source +++ b/ci/build-and-verify-source-package @@ -1,4 +1,7 @@ #!/bin/sh +# +# Test that it works to build from a source archive exported by "git archive" +# outside a Git repository. set -eu @@ -6,18 +9,13 @@ set -eu # without resorting to setting base_dir. export CMAKE_GENERATOR=Ninja -rm -rf build_package_source_dir_test -mkdir -p build_package_source_dir_test -cd build_package_source_dir_test -cmake .. -ninja -v package_source - tmp_dir=$(mktemp -d) trap "rm -rf $tmp_dir" EXIT -tar -xf ccache-*.tar.xz -C $tmp_dir -cd $tmp_dir/ccache-* - +git archive --prefix=ccache/ -o $tmp_dir/ccache.tar.gz HEAD +cd $tmp_dir +tar xf ccache.tar.gz +cd ccache mkdir build cd build cmake .. |