Skip to content
Snippets Groups Projects

remove placeholder ci-rev-short-sha; add others read from package json

Merged Hahn Axel (hahn) requested to merge 7030-ci-projectvars-for-replacement into master
1 file
+ 4
6
Compare changes
  • Side-by-side
  • Inline
+ 4
6
@@ -19,6 +19,7 @@
# 2023-12-14 v1.2 <axel.hahn@unibe.ch> export some vars; abort on errors
# 2023-12-18 v1.3 <axel.hahn@unibe.ch> add lines to profile log on error
# 2024-02-22 v1.4 <axel.hahn@unibe.ch> create replace_ciserver.txt
# 2024-02-22 v1.5 <axel.hahn@unibe.ch> remove placeholder ci-rev-short-sha; add others read from package json
# ======================================================================
@@ -26,7 +27,7 @@
# CONFIG
# ----------------------------------------------------------------------
cd $( dirname $0 )
_version=1.4
_version=1.5
export selfdir; selfdir=$( /bin/pwd )
export profiledir
@@ -262,15 +263,12 @@ function deploy(){
exit 4
fi
echo "# generated with data from $cijson" > "$replacefile"
for mykey in branch revision
for mykey in branch branch_short branch_type revision revision_short imagepart
do
civalue=$( cat "$cijson" | jq ".${mykey}" | tr -d '"')
civalue=$( cat "${cijson}" | jq ".${mykey}" | tr -d '"')
echo "ci-${mykey}=$civalue" >> "$replacefile"
done
# "revision" must be the last mykey that this works:
echo "ci-rev-short-sha=${civalue:0:8}" >> "$replacefile"
ls -l "$replacefile"
Loading