catalyst-auto: update arch configs after timestamp changes
Commit ed258c751b
(change
datestamp->timestamp) broke a lot of builders. The symlinks
and upload logic were all based on the datestamp. Update it
to use the new timestamp format.
This commit is contained in:
parent
bbca329576
commit
40ed3e84d7
8 changed files with 179 additions and 107 deletions
|
@ -22,17 +22,26 @@ give_latest_from_dates() {
|
|||
tr '~' '-'
|
||||
}
|
||||
|
||||
# Replace the date/time stamp in the filename to "latest".
|
||||
# Forms we handle:
|
||||
# stage3-xxx-2018.0.tar.bz2
|
||||
# stage3-xxx-20180116.tar.bz2
|
||||
# stage3-xxx-20180116T015819Z.tar.bz2
|
||||
convert_filename() {
|
||||
sed -E 's:-20[0-9]+(\.[0-9]+|T[0-9]+Z)?:-latest:g'
|
||||
}
|
||||
|
||||
update_symlinks() {
|
||||
# Symlink the latest stages3 to build from
|
||||
for d in ${BUILD_SRCDIR_BASE}/builds/default ; do
|
||||
pushd $d >/dev/null
|
||||
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates ) ; do
|
||||
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
|
||||
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for $
|
||||
ln -sf $f $of
|
||||
done
|
||||
popd >/dev/null
|
||||
done
|
||||
# Symlink the latest stages3 to build from
|
||||
local d f
|
||||
for d in "${BUILD_SRCDIR_BASE}/builds/default" ; do
|
||||
pushd "${d}" >/dev/null
|
||||
for f in $(ls stage3-${SUBARCH}-*bz2 | grep -v latest | give_latest_from_dates) ; do
|
||||
local of=$(echo "${f}" | convert_filename)
|
||||
ln -sf "${f}" "${of}"
|
||||
done
|
||||
popd >/dev/null
|
||||
done
|
||||
}
|
||||
|
||||
upload() {
|
||||
|
@ -46,12 +55,12 @@ post_build() {
|
|||
|
||||
case ${spec} in
|
||||
netboot/netboot.spec)
|
||||
mv netboot2-s390-${DATESTAMP}/kernels/netboot netboot2-s390-${DATESTAMP}/netboot-s390-kernel-${DATESTAMP}
|
||||
mv netboot2-s390-${DATESTAMP}/kernels/misc/netboot.igz netboot2-s390-${DATESTAMP}/netboot-s390-initramfs-${DATESTAMP}
|
||||
upload netboot2-s390-${DATESTAMP}/netboot*
|
||||
mv netboot2-s390-${TIMESTAMP}/kernels/netboot netboot2-s390-${TIMESTAMP}/netboot-s390-kernel-${TIMESTAMP}
|
||||
mv netboot2-s390-${TIMESTAMP}/kernels/misc/netboot.igz netboot2-s390-${TIMESTAMP}/netboot-s390-initramfs-${TIMESTAMP}
|
||||
upload netboot2-s390-${TIMESTAMP}/netboot*
|
||||
;;
|
||||
stage3.spec)
|
||||
upload stage3-${SUBARCH}-*${DATESTAMP}*.tar.bz2*
|
||||
upload stage3-${SUBARCH}-*${TIMESTAMP}*.tar.bz2*
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue