Make linux zip from GitHub's remote Docker image
Locally I had trouble building the image on both my previous Intel MacBook Pro and my new M1 Max MacBook Pro.
This commit is contained in:
parent
0e5d838765
commit
ca2712aaee
9
Makefile
9
Makefile
|
@ -111,6 +111,13 @@ zip_linux: docker_image
|
|||
cp -f "$(LICENSE_PATH)" "$(TMP_FOLDER)"
|
||||
(cd "$(TMP_FOLDER)"; zip -yr - "swiftlint" "LICENSE") > "./swiftlint_linux.zip"
|
||||
|
||||
zip_linux_release:
|
||||
$(eval TMP_FOLDER := $(shell mktemp -d))
|
||||
docker run ghcr.io/realm/swiftlint:$(VERSION_STRING) cat /usr/bin/swiftlint > "$(TMP_FOLDER)/swiftlint"
|
||||
chmod +x "$(TMP_FOLDER)/swiftlint"
|
||||
cp -f "$(LICENSE_PATH)" "$(TMP_FOLDER)"
|
||||
(cd "$(TMP_FOLDER)"; zip -yr - "swiftlint" "LICENSE") > "./swiftlint_linux.zip"
|
||||
|
||||
package: build
|
||||
$(eval PACKAGE_ROOT := $(shell mktemp -d))
|
||||
cp "$(SWIFTLINT_EXECUTABLE)" "$(PACKAGE_ROOT)"
|
||||
|
@ -121,7 +128,7 @@ package: build
|
|||
--version $(VERSION_STRING) \
|
||||
"$(OUTPUT_PACKAGE)"
|
||||
|
||||
release: package portable_zip zip_linux
|
||||
release: package portable_zip zip_linux_release
|
||||
|
||||
docker_image:
|
||||
docker build --platform linux/amd64 --force-rm --tag swiftlint .
|
||||
|
|
Loading…
Reference in New Issue