Skip to content

Commit 880ce85

Browse files
committed
Fix release artifact naming
1 parent 2f34bac commit 880ce85

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/build-release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,14 +364,14 @@ jobs:
364364
run: |
365365
# We want artifacts to be named consistently, specifically in the form of
366366
# "<artifact_name>-<bfd_version>.<ext>". However, they are generated as
367-
# "bfd-server-war-<bfd_version>-<artfiact_name>.<ext>", so we need to do some filename
367+
# "bfd-server-war-<bfd_version>-<artifact_name>.<ext>", so we need to do some filename
368368
# manipulation here
369369
for artifact_path in ./*
370370
do
371-
artifact="$(basename -- "$artifact_path")"
372-
artifact_ext="${artifact##.*}"
373-
artifact_name="${artifact%.*}"
374-
mv "$artifact_path" "./${artifact_name/bfd-server-war-$BFD_RELEASE-/}-${BFD_RELEASE}.${artifact_ext}"
371+
artifact="$(basename -- "$artifact_path" | sed -nE "s/bfd-server-war-$BFD_RELEASE-(.*)/\1/p")"
372+
artifact_ext="${artifact#*.}"
373+
artifact_name="${artifact%%.*}"
374+
mv "$artifact_path" "./${artifact_name}-${BFD_RELEASE}.${artifact_ext}"
375375
done
376376
377377
- name: Release

0 commit comments

Comments
 (0)