Skip to content

Commit

Permalink
Merge pull request #1464 from cyberark/copy-assets-fix
Browse files Browse the repository at this point in the history
Goreleaser copy asset fix
  • Loading branch information
neil-k-zero authored May 16, 2022
2 parents 2d34393 + d750d9b commit d641b1e
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions bin/copy_release_assets
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ root_assets() {
'CHANGELOG.md'
'LICENSE'
)
local complete_assets

# shellcheck disable=SC2086
declare -a complete_assets
# shellcheck disable=SC2206
for asset in "${assets[@]}"; do
# globbing is intentional for assets
echo "${dir}"/${asset}
complete_assets+=("$dir/"${asset})
done

printf "%s\n" "${complete_assets[@]}"
}

goreleaser_assets() {
Expand All @@ -55,12 +59,16 @@ goreleaser_assets() {
secretless-broker-darwin_amd64_v1
secretless-broker-darwin_arm64
)
local complete_assets

# shellcheck disable=SC2086
declare -a complete_assets
# shellcheck disable=SC2206
for asset in "${assets[@]}"; do
# globbing is intentional for assets
echo "${dir}"/${asset}
complete_assets+=("$dir/"${asset})
done

printf "%s\n" "${complete_assets[@]}"
}

function main() {
Expand All @@ -70,6 +78,7 @@ function main() {

# Copy assets into Github release asset dir
for asset in "${assets[@]}"; do
echo "COPYING ${asset} to ${asset_dir}"
cp "${asset}" "$asset_dir"
done

Expand All @@ -92,6 +101,7 @@ function rename_assets() {
# Find all assets ending with _v1
for file in "${asset_dir}"/*_v1; do
# Rename file, removing _v1 from asset
echo "RENAMING ${file} to ${file/_v1/}"
mv "$file" "${file/_v1/}"
done
}
Expand Down

0 comments on commit d641b1e

Please sign in to comment.