Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions daily-tags.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,6 @@ if echo "$AUTOTAG_TAG" | grep -Fq '!!'; then
exit 1
fi

# The tag doesn't exist yet, so build using the branch first.
for package in $PACKAGES; do
edit_package_tag "$package" "$DEFAULTS" "rc/$AUTOTAG_TAG" "$AUTOTAG_OVERRIDE_VERSION"
done

git -C alidist diff || :

for package in $PACKAGES; do (
rm -rf "${package,,}.git"
AUTOTAG_REMOTE=$(grep -E '^(source:|write_repo:)' "alidist/${package,,}.sh" | sort -r | head -n1 | cut -d: -f2- | xargs echo)
Expand All @@ -151,7 +144,7 @@ for package in $PACKAGES; do (

[[ -d $AUTOTAG_MIRROR ]] || AUTOTAG_MIRROR=
mkdir "${package,,}.git"
cd "${package,,}.git"
pushd "${package,,}.git"
git clone --bare ${AUTOTAG_MIRROR:+--reference=$AUTOTAG_MIRROR} "$AUTOTAG_REMOTE" .
AUTOTAG_HASH=$(git ls-remote origin "refs/tags/$AUTOTAG_TAG" | tail -1 | cut -f1)
if [ -n "$AUTOTAG_HASH" ]; then
Expand Down Expand Up @@ -186,9 +179,14 @@ for package in $PACKAGES; do (
# At this point, we have $AUTOTAG_HASH for sure. It might come from HEAD, an existing rc/* branch,
# or an existing tag. We always create a new branch out of it
git push origin "+$AUTOTAG_HASH:refs/heads/rc/$AUTOTAG_TAG"

popd
edit_package_tag "$package" "$DEFAULTS" "$AUTOTAG_HASH" "$AUTOTAG_OVERRIDE_VERSION"
fi
); done

git -C alidist diff || :

# Set default remote store -- S3 on slc8 and Ubuntu, rsync everywhere else.
case "$ARCHITECTURE" in
slc8_*|ubuntu*) : "${REMOTE_STORE:=b3://alibuild-repo::rw}" ;;
Expand Down