-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (32 loc) · 1.02 KB
/
Makefile
File metadata and controls
39 lines (32 loc) · 1.02 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
# BIN = ./node_modules/.bin
BROWSERIFY_PATH = ./node_modules/.bin/browserify
.PHONY: test clean dist
dist:
rm -rf dist
mkdir dist
cd dist && .$(BROWSERIFY_PATH) ../index.js > compose-shell.js
cd dist && .$(BROWSERIFY_PATH) ../index.js -d -p [minifyify --map compose-shell.map.json --output compose-shell.map.json] > compose-shell.min.js
cp shell.css dist/
test:
@npm test
define release
VERSION=`node -pe "require('./package.json').version"` && \
NEXT_VERSION=`node -pe "require('semver').inc(\"$$VERSION\", '$(1)')"` && \
node -e "\
var j = require('./package.json');\
j.version = \"$$NEXT_VERSION\";\
var s = JSON.stringify(j, null, 2);\
require('fs').writeFileSync('./package.json', s);" && \
git commit -m "Version $$NEXT_VERSION" -- package.json && \
git tag "$$NEXT_VERSION" -m "Version $$NEXT_VERSION"
endef
release-patch: test
@$(call release,patch)
release-minor: test
@$(call release,minor)
release-major: test
@$(call release,major)
publish:
git push
git push --tags origin HEAD:master
npm publish