Skip to content

Commit 3443b35

Browse files
author
Tonye Jack
committed
Added support for creating new releases.
1 parent 2e35e6c commit 3443b35

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

Makefile

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
1-
bump-version:
1+
# Self-Documented Makefile see https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
2+
3+
.DEFAULT_GOAL := help
4+
5+
6+
PART := patch
7+
PREVIOUS_COMMIT_TAG := $(shell git rev-list --tags --max-count=1)
8+
CURRENT_VERSION := $(shell git describe "$(PREVIOUS_COMMIT_TAG)" --tags)
9+
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-32s-\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
14+
15+
.PHONY: help
16+
17+
create-new-release:
218
@echo "Increasing version..."
19+
@echo "Current version $(CURRENT_VERSION)"
20+
@npm version $(PART) -m "Bumped from $(CURRENT_VERSION) to version %s"
21+
@echo "Current version $(CURRENT_VERSION)"
22+

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-codegen-hook",
3-
"version": "1.0.0",
3+
"version": "0.0.11",
44
"description": "Graphql code generator pre-commit hook",
55
"main": "./bin/graphql-codegen-hook.js",
66
"scripts": {

0 commit comments

Comments
 (0)