refactor: replace inline artifact renaming with script call
- Updated the Makefile to utilize `rename_legacy_artifacts.sh` for renaming legacy artifacts in the `build-appimage-legacy` and `build-exe-legacy` targets, enhancing maintainability and clarity.
This commit is contained in:
13
Makefile
13
Makefile
@@ -48,23 +48,16 @@ dist: build-appimage
|
|||||||
electron-legacy:
|
electron-legacy:
|
||||||
$(NPM) install --no-save electron@$(LEGACY_ELECTRON_VERSION)
|
$(NPM) install --no-save electron@$(LEGACY_ELECTRON_VERSION)
|
||||||
|
|
||||||
|
# Legacy targets intended for manual/local builds; CI uses workflow jobs.
|
||||||
build-appimage-legacy: build electron-legacy
|
build-appimage-legacy: build electron-legacy
|
||||||
$(NPM) run electron-postinstall
|
$(NPM) run electron-postinstall
|
||||||
$(NPM) run dist -- --linux AppImage
|
$(NPM) run dist -- --linux AppImage
|
||||||
@set -e; for f in dist/*-linux.AppImage dist/*-linux.deb; do \
|
./scripts/rename_legacy_artifacts.sh
|
||||||
[ -e "$$f" ] || continue; \
|
|
||||||
dir=$$(dirname "$$f"); base=$$(basename "$$f"); ext=$${base##*.}; name=$${base%.$$ext}; \
|
|
||||||
mv "$$f" "$$dir/$${name}-legacy.$$ext"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
build-exe-legacy: build electron-legacy
|
build-exe-legacy: build electron-legacy
|
||||||
$(NPM) run electron-postinstall
|
$(NPM) run electron-postinstall
|
||||||
$(NPM) run dist -- --win portable
|
$(NPM) run dist -- --win portable
|
||||||
@set -e; for f in dist/*-win-installer.exe dist/*-win-portable.exe; do \
|
./scripts/rename_legacy_artifacts.sh
|
||||||
[ -e "$$f" ] || continue; \
|
|
||||||
dir=$$(dirname "$$f"); base=$$(basename "$$f"); ext=$${base##*.}; name=$${base%.$$ext}; \
|
|
||||||
mv "$$f" "$$dir/$${name}-legacy.$$ext"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf node_modules
|
rm -rf node_modules
|
||||||
|
|||||||
Reference in New Issue
Block a user