Ensure that binaries are executable

This commit is contained in:
Danny Mösch
2025-01-11 15:06:03 +01:00
parent 329f9b0204
commit d0a2bfdb5a
2 changed files with 11 additions and 7 deletions
+5 -1
View File
@@ -94,8 +94,12 @@ jobs:
with:
name: swiftlint_linux_amd64
path: .build/linux
- name: Make binary executable
run: chmod +x .build/universal/swiftlint .build/linux/swiftlint_linux_amd64
- name: List downloaded files
run: tree .build
- name: Create SPM artifact bundle
run: make spm_artifactbundle
run: make --debug spm_artifactbundle
- name: Update binary target in Swift package
run: ./tools/update-artifact-bundle.sh "${{ inputs.version }}"
- name: Create tag and release commit
+6 -6
View File
@@ -28,9 +28,9 @@ OUTPUT_PACKAGE=SwiftLint.pkg
VERSION_STRING=$(shell ./tools/get-version)
.PHONY: all clean build install package test uninstall docs
.PHONY: all clean install package test uninstall docs
all: build
all: $(SWIFTLINT_EXECUTABLE)
sourcery: Source/SwiftLintBuiltInRules/Models/BuiltInRules.swift Source/SwiftLintFramework/Models/ReportersList.swift Tests/GeneratedTests/GeneratedTests.swift
@@ -72,7 +72,7 @@ clean:
clean_xcode:
$(BUILD_TOOL) $(XCODEFLAGS) -configuration Test clean
build:
$(SWIFTLINT_EXECUTABLE):
mkdir -p "$(SWIFTLINT_EXECUTABLE_PARENT)"
bazel build --config release universal_swiftlint
$(eval SWIFTLINT_BINARY := $(shell bazel cquery --config release --output=files universal_swiftlint))
@@ -88,7 +88,7 @@ $(SWIFTLINT_EXECUTABLE_LINUX_AMD64):
build_with_disable_sandbox:
swift build --disable-sandbox $(SWIFT_BUILD_FLAGS)
install: build
install: $(SWIFTLINT_EXECUTABLE)
install -d "$(BINARIES_FOLDER)"
install "$(SWIFTLINT_EXECUTABLE)" "$(BINARIES_FOLDER)"
@@ -96,7 +96,7 @@ uninstall:
rm -rf "$(FRAMEWORKS_FOLDER)/SwiftLintFramework.framework"
rm -f "$(BINARIES_FOLDER)/swiftlint"
installables: build
installables: $(SWIFTLINT_EXECUTABLE)
install -d "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
install "$(SWIFTLINT_EXECUTABLE)" "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
@@ -134,7 +134,7 @@ zip_linux_release: $(SWIFTLINT_EXECUTABLE_LINUX_AMD64)
cp -f "$(LICENSE_PATH)" "$(TMP_FOLDER)"
(cd "$(TMP_FOLDER)"; zip -yr - "swiftlint" "LICENSE") > "./swiftlint_linux.zip"
package: build
package: $(SWIFTLINT_EXECUTABLE)
$(eval PACKAGE_ROOT := $(shell mktemp -d))
cp "$(SWIFTLINT_EXECUTABLE)" "$(PACKAGE_ROOT)"
pkgbuild \