Skip to content
Snippets Groups Projects
Commit b640fd79 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

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

parent 7c769f52
No related branches found
No related tags found
1 merge request!22remove placeholder ci-rev-short-sha; add others read from package json
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment