]> git.r.bdr.sh - rbdr/lyricli/blame_incremental - Makefile
Bumping to 1.0.0 to use semver
[rbdr/lyricli] / Makefile
... / ...
CommitLineData
1configuration = debug
2build_path = .build
3
4# These are used to rename the executable to lrc without renaming the package
5source_binary_name = lyricli
6target_binary_name = lrc
7install_path = /usr/local/bin
8source_binary_path = $(build_path)/$(configuration)/$(source_binary_name)
9install_binary_path = $(install_path)/$(target_binary_name)
10swift_version = 5.0.1
11
12# Default to release configuration on install
13install: configuration = release
14
15default: build
16
17build:
18 swift build --build-path $(build_path) --configuration $(configuration)
19
20install: build
21 cp $(source_binary_path) $(install_binary_path)
22
23test: build
24 swift test
25
26lint:
27 cd Sources && swiftlint
28
29document: build
30 sourcekitten doc --spm-module $(source_binary_name) > $(build_path)/$(source_binary_name).json
31 jazzy \
32 -s $(build_path)/$(source_binary_name).json \
33 --readme README.md \
34 --clean \
35 --author Lyricli \
36 --author_url https://gitlab.com/lyricli \
37 --github_url https://gitlab.com/lyricli/lyricli \
38 --module-version 0.4.0 \
39 --module Lyricli \
40
41clean:
42 swift package clean
43
44docker-build:
45 docker build --force-rm --build-arg swift_version=$(swift_version) -t lyriclitest/swift:$(swift_version) .
46
47docker-push: docker-build
48 docker push lyriclitest/swift:$(swift_version)
49
50.PHONY: build install test clean lint docker-build docker-push