Skip to content

Commit

Permalink
escape characters 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Jun 28, 2023
1 parent d5fed18 commit 7411cc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/reusable-verify-release-zip.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ jobs:
},
{
name: enterprise,
suffix: "\\+ent",
suffix: "+ent.fips1402",
suffixForMatch: "\\\+ent\\\.fips1402",
targets: [
{ os: "darwin", arch: "amd64" },
{ os: "darwin", arch: "arm64" },
Expand All @@ -63,7 +64,8 @@ jobs:
},
{
name: ent-fips,
suffix: "\\+ent\\.fips1402",
suffix: "+ent.fips1402",
suffixForMatch: "\\\+ent\\\.fips1402",
targets: [
{ os: "linux", arch: "amd64" },
{ os: "linux", arch: "arm64" },
Expand All @@ -78,7 +80,7 @@ jobs:
- name: verify zips - ${{ matrix.release.name }}
if: ${{ !matrix.release.fips || (inputs.include-fips && matrix.release.fips) }}
run: |
export zips=$(echo '${{ toJSON(matrix.release.targets) }}' | jq -r 'map("consul" + "_" + "${{ inputs.version }}" + "${{ matrix.release.suffix }}" + "_" + .os + "_" + .arch + "\.zip" )| join("|")')
export zips=$(echo '${{ toJSON(matrix.release.targets) }}' | jq -r 'map("consul" + "_" + "${{ inputs.version }}" + "${{ matrix.release.suffixForMatch }}" + "_" + .os + "_" + .arch + "\.zip" )| join("|")')
expected=$(echo '${{ toJSON(matrix.release.targets) }}' | jq length)
found=$(curl https://releases.hashicorp.com/consul/${{ inputs.version }}${{ matrix.release.suffix }}/ \
| grep -E "${zips}" \
Expand Down

0 comments on commit 7411cc8

Please sign in to comment.