-
Notifications
You must be signed in to change notification settings - Fork 58
/
Makefile
44 lines (34 loc) · 1.2 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# the `release` action uses `sed` expressions which are only compatible with the GNU sed
ifeq ($(shell which gsed),)
SED := sed
else
SED := gsed
endif
build-appimage:
poetry run appimage-builder --recipe ./release-utils/appimage/appimage-builder.yml
lint-style:
poetry run pycodestyle .
lint-types:
poetry run pyright .
install-pyright:
npm i -g [email protected]
lint: lint-style lint-types
test:
poetry run pytest tests
build-docker:
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker build . -t rclip
# CI runs release-brew as part of the `release` action
build-windows:
poetry run pyinstaller -y ./release-utils/windows/pyinstaller.spec
# CI runs release-brew as part of the `release` action
release-brew:
poetry run ./release-utils/homebrew/release.sh
release:
@test $(VERSION) || (echo "VERSION arg is required" && exit 1)
poetry version $(VERSION)
$(SED) -i "s/version: .*/version: $$(poetry version -s)/" snap/snapcraft.yaml
$(SED) -i "s/source: .*/source: .\/snap\/local\/rclip-$$(poetry version -s).tar.gz/" snap/snapcraft.yaml
git commit -am "release: v$$(poetry version -s)"
git push origin $$(git branch --show-current)
git tag v$$(poetry version -s)
git push origin v$$(poetry version -s)