Use github source code archive
Instead of generating our own archive we now use the github generated source code archive instead [1]. We now only sync on the LLVM version and git revision via our own github releases [2]. [1]: https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives#source-code-archive-urls [2]: https://github.com/fedora-llvm-team/llvm-snapshots/releases/tag/snapshot-version-sync
This commit is contained in:
parent
c445e81a3f
commit
8442b8df62
@ -3,7 +3,6 @@
|
|||||||
# You need these packages to run this script: git tar xz curl-minimal
|
# You need these packages to run this script: git tar xz curl-minimal
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set +x
|
|
||||||
|
|
||||||
# This is important for systems that have a different local but want to produce
|
# This is important for systems that have a different local but want to produce
|
||||||
# a valid changelog date.
|
# a valid changelog date.
|
||||||
@ -18,30 +17,14 @@ loginfo "Determine date in YYYYMMDD form"
|
|||||||
llvm_snapshot_yyyymmdd=$(date +%Y%m%d)
|
llvm_snapshot_yyyymmdd=$(date +%Y%m%d)
|
||||||
[[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD
|
[[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD
|
||||||
|
|
||||||
loginfo "Get the source tarball"
|
git_revision_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-git-revision-${llvm_snapshot_yyyymmdd}.txt
|
||||||
tarball_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/source-snapshot/llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz
|
loginfo "Get the revision for today from $git_revision_url"
|
||||||
tarball=llvm-project-${llvm_snapshot_yyyymmdd}.src.tar.xz
|
llvm_snapshot_git_revision=$(curl -sL $git_revision_url)
|
||||||
if [ -e $tarball ]; then
|
|
||||||
loginfo "Source tarball already exists: $tarball"
|
|
||||||
else
|
|
||||||
loginfo "Downloading source tarball $tarball from $tarball_url"
|
|
||||||
curl -sL -o $tarball ${tarball_url}
|
|
||||||
fi
|
|
||||||
|
|
||||||
loginfo "Grab git revision from tarball"
|
|
||||||
llvm_snapshot_git_revision=$(xzcat $tarball | git get-tar-commit-id)
|
|
||||||
llvm_snapshot_git_revision_short=$(echo "${llvm_snapshot_git_revision:0:14}")
|
llvm_snapshot_git_revision_short=$(echo "${llvm_snapshot_git_revision:0:14}")
|
||||||
|
|
||||||
versionfile=llvm-project*.src/cmake/Modules/LLVMVersion.cmake
|
release_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-release-${llvm_snapshot_yyyymmdd}.txt
|
||||||
loginfo "Extract the ${versionfile} file from the source tarball"
|
loginfo "Get the release for today from $release_url"
|
||||||
if [ -e $versionfile ]; then
|
llvm_snapshot_version=$(curl -sL $release_url)
|
||||||
loginfo "CMakeLists.txt already exists: ${versionfile}"
|
|
||||||
else
|
|
||||||
tar -xf $tarball $versionfile
|
|
||||||
fi
|
|
||||||
|
|
||||||
loginfo "Parse ${versionfile} for the LLVM version"
|
|
||||||
llvm_snapshot_version=$(grep -ioP 'set\(\s*LLVM_VERSION_(MAJOR|MINOR|PATCH)\s\K[0-9]+' ${versionfile} | paste -sd '.')
|
|
||||||
llvm_snapshot_version_major=$(echo $llvm_snapshot_version | cut -f1 -d.)
|
llvm_snapshot_version_major=$(echo $llvm_snapshot_version | cut -f1 -d.)
|
||||||
llvm_snapshot_version_minor=$(echo $llvm_snapshot_version | cut -f2 -d.)
|
llvm_snapshot_version_minor=$(echo $llvm_snapshot_version | cut -f2 -d.)
|
||||||
llvm_snapshot_version_patch=$(echo $llvm_snapshot_version | cut -f3 -d.)
|
llvm_snapshot_version_patch=$(echo $llvm_snapshot_version | cut -f3 -d.)
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
/*.src.rpm
|
/*.src.rpm
|
||||||
/*.src.tar.xz
|
/*.src.tar.xz
|
||||||
/*.src.tar.xz.sig
|
/*.src.tar.xz.sig
|
||||||
|
/*.tar.gz
|
||||||
/cmake/
|
/cmake/
|
||||||
/llvm-*.src/
|
/llvm-*.src/
|
||||||
/results_llvm/
|
/results_llvm/
|
||||||
|
Loading…
Reference in New Issue
Block a user