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
36 changes: 25 additions & 11 deletions infrastructure/scripts/create-testdata/create-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ set -o pipefail
name=${1}
applicationOwnerTeam=${2:-sreteam}
prev=${3:-""}
useOldApi=false

function debug() {
echo "$@" > /dev/stderr
Expand Down Expand Up @@ -107,15 +108,28 @@ then
inputs+=(--form-string "previous_commit_id=${prev}")
fi

curl http://localhost:${FRONTEND_PORT}/api/release \
-H "author-email:${EMAIL}" \
-H "author-name:${AUTHOR}=" \
"${inputs[@]}" \
"${release_version[@]}" \
"${revision[@]}" \
--form-string "display_version=${displayVersion}" \
--form "source_message=<${commit_message_file}" \
"${configuration[@]}" \
"${manifests[@]}"

debug "useOldApi=$useOldApi"
if $useOldApi; then
curl http://localhost:${FRONTEND_PORT}/release \
-H "author-email:${EMAIL}" \
-H "author-name:${AUTHOR}=" \
"${inputs[@]}" \
"${release_version[@]}" \
"${revision[@]}" \
--form-string "display_version=${displayVersion}" \
--form "source_message=<${commit_message_file}" \
"${configuration[@]}" \
"${manifests[@]}"
else
curl http://localhost:${FRONTEND_PORT}/api/release \
-H "author-email:${EMAIL}" \
-H "author-name:${AUTHOR}=" \
"${inputs[@]}" \
"${release_version[@]}" \
"${revision[@]}" \
--form-string "display_version=${displayVersion}" \
--form "source_message=<${commit_message_file}" \
"${configuration[@]}" \
"${manifests[@]}"
fi
echo # curl sometimes does not print a trailing \n
Loading