- Introduced `rename_legacy_artifacts.sh` to automate the renaming of legacy artifacts with a '-legacy' suffix for better differentiation and maintainability.
22 lines
386 B
Bash
Executable File
22 lines
386 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
shopt -s nullglob
|
|
|
|
patterns=(
|
|
"dist/*-win-installer.exe"
|
|
"dist/*-win-portable.exe"
|
|
"dist/*-linux.AppImage"
|
|
"dist/*-linux.deb"
|
|
)
|
|
|
|
for pattern in "${patterns[@]}"; do
|
|
for f in $pattern; do
|
|
dir=$(dirname "$f")
|
|
base=$(basename "$f")
|
|
ext="${base##*.}"
|
|
name="${base%.$ext}"
|
|
mv "$f" "$dir/${name}-legacy.${ext}"
|
|
done
|
|
done
|