forked from jan-kiszka/togglelinewrap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (46 loc) · 1.15 KB
/
Makefile
File metadata and controls
55 lines (46 loc) · 1.15 KB
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
45
46
47
48
49
50
51
52
53
54
55
#
# Toggle Line Wrap Thunderbird Add-On
#
# Copyright (c) Jan Kiszka, 2020
#
# Authors:
# Jan Kiszka <jan.kiszka@web.de>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
ifeq ($(V),1)
Q =
else
Q = @
endif
PACKAGE_NAME=togglelinewrap
RELEASE_TAG=$(shell git describe --match "[0-9].[0-9]*" --dirty)
ARCHIVE_NAME=$(PACKAGE_NAME)-$(RELEASE_TAG).xpi
PACKAGE_FILES= \
background-script.js \
manifest.json \
options.html \
options.js \
api/ComposeLineWrap/ \
icon.png \
COPYING
UPDATE_VERSION='s|"version":.*|"version": "$(VERSION)",|'
all package: clean $(PACKAGE_FILES)
zip -r $(ARCHIVE_NAME) $(PACKAGE_FILES)
clean:
rm -f $(ARCHIVE_NAME)
release:
${Q}if [ -z "$(VERSION)" ]; then \
echo "VERSION is not set"; \
exit 1; \
fi
${Q}if [ -n "`git status -s -uno`" ]; then \
echo "Working directory is dirty!"; \
exit 1; \
fi
${Q}sed -i $(UPDATE_VERSION) manifest.json
git commit -s manifest.json -m "Bump version number"
git tag -as $(VERSION) -m "Release $(VERSION)"
.PHONY: clean release