summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorRin Kuryloski <kuryloskip@vmware.com>2022-10-04 10:23:11 +0200
committerRin Kuryloski <kuryloskip@vmware.com>2022-10-04 10:29:04 +0200
commitcc75747560f46bc34d9331410143ed67e3dd13e4 (patch)
treeda046b162236da8fe671aff3f71ec040a0ea1de4 /.github
parent1843d79b56856bf5e0a32e329b2e8d5b04da4b83 (diff)
downloadrabbitmq-server-git-cc75747560f46bc34d9331410143ed67e3dd13e4.tar.gz
Fail the update-otp-patches workflow is string replacement fails
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/update-otp-patches.yaml6
1 files changed, 4 insertions, 2 deletions
diff --git a/.github/workflows/update-otp-patches.yaml b/.github/workflows/update-otp-patches.yaml
index 50980af713..665ffff165 100644
--- a/.github/workflows/update-otp-patches.yaml
+++ b/.github/workflows/update-otp-patches.yaml
@@ -83,12 +83,13 @@ jobs:
let source = await readFile(s, 'utf-8');
let pattern = await readFile(p, 'utf-8');
let replacement = await readFile(r, 'utf-8');
+ if (!source.includes(pattern)) process.exit(1);
let updated = source.replace(pattern, replacement);
await writeFile(s, updated);
EOF
cat << EOF > old.txt
- internal_erlang_from_http_archive(
+ internal_erlang_from_github_release(
name = "${{ matrix.name }}",
sha256 = "${OLD_SHA}",
version = "${OLD_VERSION}",
@@ -96,7 +97,7 @@ jobs:
EOF
cat << EOF > new.txt
- internal_erlang_from_http_archive(
+ internal_erlang_from_github_release(
name = "${{ matrix.name }}",
sha256 = "${{ steps.fetch-version.outputs.SHA }}",
version = "${{ steps.fetch-version.outputs.VERSION }}",
@@ -104,6 +105,7 @@ jobs:
EOF
node replacer.mjs WORKSPACE old.txt new.txt
+ rm replacer.mjs old.txt new.txt
set -x
git diff