-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
36 lines (29 loc) · 983 Bytes
/
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
# Makefile for Scaffolder CLI
# usage: make OLD-RELEASE=0.1.4 NEW-RELEASE=0.2.0 all
OLD-RELEASE=0.1.4
NEW-RELEASE=0.1.5
.PHONY: install build release publish all
install:
sudo -H pip install scaffolder
build:
# updates snap/snapcraft.yaml version
sed -i '' 's/$(OLD-RELEASE)/$(NEW-RELEASE)/g' snap/snapcraft.yaml
# updates setup.py version
edit setup.py and increase version
sed -i '' 's/$(OLD-RELEASE)/$(NEW-RELEASE)/g' setup.py
git commit -am "New release $(NEW-RELEASE)"
@echo "Build completed..."
# release major, minor, patch or 2.9.1 auto increments release
release:
gh release create $(NEW-RELEASE) -F CHANGELOG.md
snapcraft release
@echo "Release finished..."
publish:
# push to PyPi (!!! Maybe this is not needed as Travis will do it if a commit is tagged)
./build.sh
#
snapcraft login
snapcraft upload --release=edge cli-$(NEW-RELEASE).snap
# login to snapcraft.io and check if the build is OK
@echo "Publish done..."
all: build release publish