-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
28 lines (23 loc) · 834 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
SHELL := /bin/bash
VERSION_PYTHON := $(shell egrep '^VERSION = ' custom_components/pioneer_async/const.py | cut -d\ -f3 | tr -d \" )
VERSION_MANIFEST := $(shell jq < custom_components/pioneer_async/manifest.json .version --raw-output )
VERSION := $(VERSION_MANIFEST)
.PHONY: sdist
default: usage
usage:
@echo "usage: make [ check | main ]"
check:
@echo Python version $(VERSION_PYTHON)
@echo Manifest version $(VERSION_MANIFEST)
@[ "$(VERSION_PYTHON)" == "$(VERSION_MANIFEST)" ] || { echo "ERROR: versions don't match, aborting" ; exit 1 ; }
main: check
@echo Merging dev to main for version $(VERSION)
git checkout main
git merge --ff-only dev
git push origin main
git push local main
git checkout dev
local: check
@echo Pushing dev and main to local for version $(VERSION)
git push local dev
git push local main