4 # These are used to rename the executable to lrc without renaming the package
5 source_binary_name = lyricli
6 target_binary_name = lrc
7 install_path = /usr/local/bin
8 source_binary_path = $(build_path)/$(configuration)/$(source_binary_name)
9 install_binary_path = $(install_path)/$(target_binary_name)
11 architecture = $(shell uname -m)
13 # Default to release configuration on install
14 install: configuration = release
19 swift build --build-path $(build_path) --configuration $(configuration) --arch $(architecture) -Xswiftc -cross-module-optimization
22 sudo cp $(source_binary_path) $(install_binary_path)
28 cd Sources && swiftlint
31 sourcekitten doc --spm-module $(source_binary_name) > $(build_path)/$(source_binary_name).json
33 -s $(build_path)/$(source_binary_name).json \
37 --author_url https://gitlab.com/lyricli \
38 --github_url https://gitlab.com/lyricli/lyricli \
39 --module-version 1.0.0 \
46 docker build --force-rm --build-arg swift_version=$(swift_version) -t lyriclitest/swift:$(swift_version) .
48 docker-push: docker-build
49 docker push lyriclitest/swift:$(swift_version)
51 .PHONY: build install test clean lint docker-build docker-push