diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2022-03-17 15:09:18 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-04-13 07:34:36 +0000 |
commit | f7713b0af02c13d0fa25c3834fc3085f78aa75f6 (patch) | |
tree | 15a83b970e75aa5a60dfb3ab384733a6a6a6ea29 /.gitlab-ci/download-git-cache.sh | |
parent | 33946803689a0248dc00b22ce5c3053f54e32381 (diff) | |
download | mesa-f7713b0af02c13d0fa25c3834fc3085f78aa75f6.tar.gz |
ci: Use CI_PROJECT_NAME instead of hardcoding 'mesa'
This can make it more convenient for other projects to reuse these
scripts.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15891>
Diffstat (limited to '.gitlab-ci/download-git-cache.sh')
-rw-r--r-- | .gitlab-ci/download-git-cache.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/.gitlab-ci/download-git-cache.sh b/.gitlab-ci/download-git-cache.sh index d7c7d72c9b7..ece21601750 100644 --- a/.gitlab-ci/download-git-cache.sh +++ b/.gitlab-ci/download-git-cache.sh @@ -5,7 +5,7 @@ set -o xtrace # if we run this script outside of gitlab-ci for testing, ensure # we got meaningful variables -CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(mktemp -d)/mesa} +CI_PROJECT_DIR=${CI_PROJECT_DIR:-$(mktemp -d)/$CI_PROJECT_NAME} if [[ -e $CI_PROJECT_DIR/.git ]] then @@ -16,8 +16,8 @@ fi TMP_DIR=$(mktemp -d) echo "Downloading archived master..." -/usr/bin/wget -O $TMP_DIR/mesa.tar.gz \ - https://${MINIO_HOST}/git-cache/${FDO_UPSTREAM_REPO}/mesa.tar.gz +/usr/bin/wget -O $TMP_DIR/$CI_PROJECT_NAME.tar.gz \ + https://${MINIO_HOST}/git-cache/${FDO_UPSTREAM_REPO}/$CI_PROJECT_NAME.tar.gz # check wget error code if [[ $? -ne 0 ]] @@ -31,6 +31,6 @@ set -e rm -rf "$CI_PROJECT_DIR" echo "Extracting tarball into '$CI_PROJECT_DIR'..." mkdir -p "$CI_PROJECT_DIR" -tar xzf "$TMP_DIR/mesa.tar.gz" -C "$CI_PROJECT_DIR" +tar xzf "$TMP_DIR/$CI_PROJECT_NAME.tar.gz" -C "$CI_PROJECT_DIR" rm -rf "$TMP_DIR" chmod a+w "$CI_PROJECT_DIR" |