From fe811968c76efb56a138fc85b8813b7b99c1834e Mon Sep 17 00:00:00 2001 From: JP Simard Date: Thu, 10 Mar 2022 20:00:49 -0500 Subject: [PATCH] Fix make package command (#3890) --- CHANGELOG.md | 5 +++++ Makefile | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff89580c630..2468b022aa7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,11 @@ body opening brace on a new line. [Tobisaninfo](https://github.com/Tobisaninfo) +* Fix SwiftLint.pkg installer installing multiple copies of SwiftLint. + [JP Simard](https://github.com/jpsim) + [#3815](https://github.com/realm/SwiftLint/issues/3815) + [#3887](https://github.com/realm/SwiftLint/issues/3887) + ## 0.46.5: Laundry Studio #### Breaking diff --git a/Makefile b/Makefile index 83cb9df48d2..bce949a0d14 100644 --- a/Makefile +++ b/Makefile @@ -111,12 +111,14 @@ zip_linux: docker_image cp -f "$(LICENSE_PATH)" "$(TMP_FOLDER)" (cd "$(TMP_FOLDER)"; zip -yr - "swiftlint" "LICENSE") > "./swiftlint_linux.zip" -package: installables +package: build + $(eval PACKAGE_ROOT := $(shell mktemp -d)) + cp "$(SWIFTLINT_EXECUTABLE)" "$(PACKAGE_ROOT)" pkgbuild \ --identifier "io.realm.swiftlint" \ --install-location "/usr/local/bin" \ - --root "$(TEMPORARY_FOLDER)" \ - --version "$(VERSION_STRING)" \ + --root "$(PACKAGE_ROOT)" \ + --version $(VERSION_STRING) \ "$(OUTPUT_PACKAGE)" release: package portable_zip zip_linux