Skip to content

Commit

Permalink
Use SWIFTLINT_EXECUTABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
norio-nomura committed Nov 17, 2017
1 parent 69b2276 commit 7d1b401
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ XCODEFLAGS=-workspace 'SwiftLint.xcworkspace' \
DSTROOT=$(TEMPORARY_FOLDER) \
OTHER_LDFLAGS=-Wl,-headerpad_max_install_names

SWIFTLINT_EXECUTABLE=$(shell swift build --configuration release --show-bin-path)/swiftlint

FRAMEWORKS_FOLDER=/Library/Frameworks
BINARIES_FOLDER=/usr/local/bin
LICENSE_PATH="$(shell pwd)/LICENSE"
Expand Down Expand Up @@ -55,19 +57,19 @@ build_with_disable_sandbox:

install: clean build
install -d "$(BINARIES_FOLDER)"
install `swift build --configuration release --show-bin-path`/swiftlint "$(BINARIES_FOLDER)"
install "$(SWIFTLINT_EXECUTABLE)" "$(BINARIES_FOLDER)"

uninstall:
rm -rf "$(FRAMEWORKS_FOLDER)/SwiftLintFramework.framework"
rm -f "$(BINARIES_FOLDER)/swiftlint"

installables: clean build
install -d "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
install `swift build --configuration release --show-bin-path`/swiftlint "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"
install "$(SWIFTLINT_EXECUTABLE)" "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)"

prefix_install: clean build_with_disable_sandbox
install -d "$(PREFIX)/bin/"
install `swift build --configuration release --show-bin-path`/swiftlint "$(PREFIX)/bin/"
install "$(SWIFTLINT_EXECUTABLE)" "$(PREFIX)/bin/"

portable_zip: installables
cp -f "$(TEMPORARY_FOLDER)$(BINARIES_FOLDER)/swiftlint" "$(TEMPORARY_FOLDER)"
Expand Down

0 comments on commit 7d1b401

Please sign in to comment.