Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Sep 11, 2024
1 parent 584d31d commit 950293d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions scripts/ci-embed-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function deps() {
}

function create_release_archive() {
local release_url metadata_url

rm -rf output/tmp/release
mkdir -p output/tmp
cp -r "$RELEASE_YAML_DIR" output/tmp/release
Expand All @@ -46,11 +48,12 @@ function create_release_archive() {
echo "versionLabel: \"${APP_VERSION}\""
} > output/tmp/release/release.yaml

# ensure that the cluster config embedded in the CI binaries is correct
release_url="https://$S3_BUCKET.s3.amazonaws.com/releases/v$(url_encode_semver "${EC_VERSION#v}").tgz"
metadata_url="https://$S3_BUCKET.s3.amazonaws.com/metadata/v$(url_encode_semver "${EC_VERSION#v}").json"

sed -i.bak "s|__version_string__|${EC_VERSION}|g" output/tmp/release/cluster-config.yaml
# remove the release and metadata override urls
sed -i.bak "s|__release_url__||g" output/tmp/release/cluster-config.yaml
sed -i.bak "s|__metadata_url__||g" output/tmp/release/cluster-config.yaml
sed -i.bak "s|__release_url__|$release_url|g" output/tmp/release/cluster-config.yaml
sed -i.bak "s|__metadata_url__|$metadata_url|g" output/tmp/release/cluster-config.yaml

tar -czf output/tmp/release.tar.gz -C output/tmp/release .

Expand Down

0 comments on commit 950293d

Please sign in to comment.