-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
43 lines (31 loc) · 955 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
37
38
39
40
41
42
43
# used tools
# bumpversion-> https://github.com/peritus/bumpversion
# github-release -> https://github.com/j0057/github-release
REPO=LMS-shoutcast
# REPO=$(notdir $(PWD))
GITHUB_USER=oweitman
GITHUB_REPO="$(GITHUB_USER)/$(REPO)"
ZIP=zip -9r --symlinks
BUMPVERSION_CFG=.bumpversion.cfg
VERSION=$(shell grep current_version $(BUMPVERSION_CFG) | cut -d "=" -f 2 | xargs)
ASSET=dist/NewShoutcast-$(VERSION).zip
SHA=$(shell sha1sum -b $(ASSET) | cut -d " " -f 1)
SRC=src/install.xml src/Plugin.pm src/HTML
.PHONY: default upload release
default:
@echo "Use make release to release"
bumpversion:
bumpversion patch
$(ASSET): $(SRC)
mkdir -p dist
cd src && $(ZIP) ../$@ .
asset: $(ASSET) $(BUMPVERSION_CFG)
sed -i "s/<sha>.*<\/sha>/<sha>$(SHA)<\/sha>/" public.xml
git commit -m "Updated SHA1" public.xml
publish: asset
git push
github-release $(GITHUB_REPO) create --publish $(VERSION) $(ASSET)
release: bumpversion
make publish
clean:
echo