Skip to content

Commit

Permalink
Ensure that Artifact tracker manifest has leading 'v' in version stri…
Browse files Browse the repository at this point in the history
…pped

Signed-off-by: Dom Del Nano <[email protected]>
  • Loading branch information
ddelnano committed Jan 17, 2025
1 parent 3ed5997 commit 7d2a83c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ci/update_files_with_release_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ version="$2"
url="$3"

readme_path="README.md"
# Strip the leading v from the version string
at_version="${version#v}"
at_versions_path="k8s/cloud/public/base/artifact_tracker_versions.yaml"

latest_release_comment="<!--${artifact_type}-latest-release-->"
Expand All @@ -49,7 +51,7 @@ latest_release_line() {
# environment variable is uppercased
artifact_tracker_env_name="PL_${artifact_type^^}_VERSION"

yq -i ".spec.template.spec.containers[] |= select(.name == \"artifact-tracker-server\").env[] |= select(.name == \"${artifact_tracker_env_name}\").value = \"${version}\"" "${at_versions_path}"
yq -i ".spec.template.spec.containers[] |= select(.name == \"artifact-tracker-server\").env[] |= select(.name == \"${artifact_tracker_env_name}\").value = \"${at_version}\"" "${at_versions_path}"

sed -i 's|.*'"${latest_release_comment}"'.*|'"$(latest_release_line)"'|' "${readme_path}"

Expand Down

0 comments on commit 7d2a83c

Please sign in to comment.