@nathapp/na-cli 1.0.0-rc.0 → 1.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +66 -0
- package/package.json +2 -2
package/Makefile
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
MAKEFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
|
|
2
|
+
ROOT_PATH := $(shell pwd)
|
|
3
|
+
|
|
4
|
+
.PHONY: test
|
|
5
|
+
|
|
6
|
+
version-major: #version-sync
|
|
7
|
+
@npm -s version major --no-git-tag-version
|
|
8
|
+
|
|
9
|
+
version-minor: #version-sync
|
|
10
|
+
@npm -s version minor --no-git-tag-version
|
|
11
|
+
|
|
12
|
+
version-patch: #version-sync
|
|
13
|
+
@npm -s version patch --no-git-tag-version
|
|
14
|
+
|
|
15
|
+
version-prerelease: #version-sync
|
|
16
|
+
@npm -s version prerelease --preid=rc --no-git-tag-version
|
|
17
|
+
|
|
18
|
+
version-latest:
|
|
19
|
+
@(git tag --sort=-creatordate || echo) | awk 'NR==1 { \
|
|
20
|
+
split($$0, n, "-"); \
|
|
21
|
+
if (n[1] != "") { \
|
|
22
|
+
split(n[1], v, "."); \
|
|
23
|
+
if (v[1] ~ /^[0-9]+$$/ && v[2] ~ /^[0-9]+$$/ && v[3] ~ /^[0-9]+$$/) { \
|
|
24
|
+
print $$0; \
|
|
25
|
+
exit 0; \
|
|
26
|
+
} \
|
|
27
|
+
} \
|
|
28
|
+
print "1.0.0-rc.0"; \
|
|
29
|
+
} \
|
|
30
|
+
END { \
|
|
31
|
+
if (NR == 0) { \
|
|
32
|
+
print "1.0.0-rc.0"; \
|
|
33
|
+
} \
|
|
34
|
+
}'
|
|
35
|
+
|
|
36
|
+
version-sync:
|
|
37
|
+
@git checkout $(CI_COMMIT_BRANCH)
|
|
38
|
+
@git pull --tags 2&>/dev/null || true
|
|
39
|
+
@git tag --sort=-creatordate | head -10
|
|
40
|
+
@cat package.json | jq -r --arg PKG_VERSION `make --no-print-directory -f$(MAKEFILE) version-latest` '.version=$$PKG_VERSION' > package.json;
|
|
41
|
+
@echo -n "Current Git tag: "; cat package.json | jq -r '.version'
|
|
42
|
+
|
|
43
|
+
version:
|
|
44
|
+
@echo $(shell node -p "require('$(ROOT_PATH)/package.json').version")
|
|
45
|
+
|
|
46
|
+
name:
|
|
47
|
+
@echo $(SERVICE_NAME)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
test:
|
|
51
|
+
@echo "Skipped"
|
|
52
|
+
|
|
53
|
+
build-prerelease: version-prerelease
|
|
54
|
+
@npm run build
|
|
55
|
+
|
|
56
|
+
build: version-patch
|
|
57
|
+
@npm run build
|
|
58
|
+
|
|
59
|
+
release:
|
|
60
|
+
@npm publish --access public
|
|
61
|
+
|
|
62
|
+
publish-prerelease: build-prerelease
|
|
63
|
+
@make --no-print-directory release
|
|
64
|
+
|
|
65
|
+
publish: build
|
|
66
|
+
@make --no-print-directory release
|
package/package.json
CHANGED