@@ -5,16 +5,20 @@ type=${2}
55arch=${3}
66date=${4:- $(date +% Y% m% d)}
77revision=${5:- 0}
8+ tagdate=${TAGDATE:- date}
89
9- major=${1: 0: 1}
10- minor=${1: 2: 1}
10+ major=${version%% .* }
11+ rest=${version#* .}
12+ minor=${rest%% .* }
1113TEMPLATE=" library-template"
1214
1315usage () {
1416 printf " %s: RELEASE TYPE ARCH [DATE]\n\n" $0
1517 log " $1 "
1618}
1719
20+ KIWI=false
21+
1822# shellcheck disable=SC2046,1091,1090
1923source " $( dirname " ${BASH_SOURCE[0]} " ) /common.sh"
2024
@@ -29,12 +33,14 @@ build-container-manifests() {
2933 build_args=" --os linux --arch s390x" ;;
3034 ppc64le)
3135 build_args=" --os linux --arch ppc64le" ;;
36+ riscv64)
37+ build_args=" --os linux --arch riscv64" ;;
3238 * ) echo " invalid arch" ; exit ;;
3339 esac
3440
35- if [[ -f kiwi.result.json ]]; then
41+ if [[ -f kiwi.result.json || $KIWI ]]; then
3642 log " found kiwi image"
37- oci=" $( find " $PWD " -maxdepth 1 -type f -name ' *.oci' ) "
43+ oci=" $( find " $PWD " -maxdepth 1 -type f -name ' *.oci* ' ) "
3844 if [[ ! -f " ${oci} " ]]; then
3945 log " could not find OCI image. Aborting"
4046 exit 2
@@ -83,7 +89,7 @@ build-container-manifests() {
8389
8490manifest-push-commands (){
8591 local destinations=(" docker.io/rockylinux/rockylinux" " quay.io/rockylinux/rockylinux" )
86- local tags=(" $version " " ${version} .${date } " )
92+ local tags=(" $version " " ${version} .${tagdate } " )
8793 local final_tags=()
8894 for d in " ${destinations[@]} " ; do
8995 for t in " ${tags[@]} " ; do
@@ -122,13 +128,25 @@ check-and-download (){
122128 exit 3
123129 fi
124130
125- log-cmd aws --region us-east-2 --profile peridot-prod s3 sync " s3://resf-empanadas/$builddir " $PWD
131+ case $version in
132+ 8|9)
133+ log-cmd aws --region us-east-2 --profile peridot-prod s3 sync " s3://resf-empanadas/$builddir " $PWD
134+ ;;
135+ * )
136+ KIWI=true
137+ until [[ -f " $( latest-build-name) " ]]; do
138+ log-cmd rsync -av " $builddir " .
139+ sleep 1;
140+ done
141+ ;;
142+ esac
126143
127144 generate-packagelist
128145 generate-filelist
129146
130147}
131148
149+ rm ./* .oci*
132150check-and-download
133151build-container-manifests
134152
@@ -140,7 +158,7 @@ if [[ ! -f "${tarball}" ]]; then
140158 exit 2
141159else
142160 mv $tarball layer.tar.xz
143- rm ./* .oci
161+ rm ./* .oci*
144162fi
145163
146164git add .
0 commit comments