forked from nstack-io/localization-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (32 loc) · 1.3 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
TM_PLIST=LocalizationManager/Supporting Files/Info.plist
CURRENT_BRANCH=$(shell git branch | sed -n -e 's/^\* \(.*\)/\1/p')
release:
ifneq ($(CURRENT_BRANCH),master)
$(error not on master branch, can't make a release)
endif
ifneq ($(strip $(shell git status --untracked-files=no --porcelain 2>/dev/null)),)
$(error git state is not clean)
endif
$(eval NEW_VERSION_AND_NAME := $(filter-out $@,$(MAKECMDGOALS)))
$(eval NEW_VERSION := $(shell echo $(NEW_VERSION_AND_NAME) | sed 's/:.*//' ))
@sed -i '' 's/## Master/## $(NEW_VERSION_AND_NAME)/g' CHANGELOG.md
@echo "## Master" | cat - CHANGELOG.md > /tmp/out && mv /tmp/out CHANGELOG.md
@sed -i '' 's/spec.version = ".*"/spec.version = "${NEW_VERSION}"/g' TranslationManager.podspec
@/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString $(NEW_VERSION)" "$(TM_PLIST)"
git commit -a -m "release $(NEW_VERSION)"
git tag -a $(NEW_VERSION) -m "$(NEW_VERSION_AND_NAME)"
git push origin master
git push origin $(NEW_VERSION)
pod trunk push
docs:
@jazzy \
--clean \
--author Nodes \
--author_url "https://www.nodesagency.com" \
--github_url "https://github.com/nodes-ios/TranslationManager" \
--no-hide-documentation-coverage \
--theme fullwidth \
--output ./jazzy_docs \
--documentation ./Documentation/*.md \
--readme README.md
@rm -rf ./build