updates/Makefile

45 lines
1.1 KiB
Makefile
Raw Normal View History

2021-08-23 07:44:25 +00:00
node_modules: package-lock.json
npm install --no-save
2020-10-05 21:10:16 +00:00
@touch node_modules
deps: node_modules
lint: node_modules
2021-08-23 07:44:25 +00:00
npx eslint --color .
2020-08-18 21:06:38 +00:00
2020-10-05 21:10:16 +00:00
test: node_modules lint build
2021-08-23 07:44:25 +00:00
NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color
2017-12-03 11:15:02 +00:00
2020-10-05 21:10:16 +00:00
unittest: node_modules
2021-08-23 07:44:25 +00:00
NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color --watchAll
2020-08-18 21:06:38 +00:00
2020-10-05 21:10:16 +00:00
build: node_modules
npx ncc build updates.js -q -m -o bin
mv bin/index.js bin/updates.js
2022-02-17 00:32:03 +00:00
perl -0777 -p -i -e 's#\n?\/\*![\s\S]*?\*\/\n?##g' bin/updates.js
chmod +x bin/updates.js
2020-03-09 22:57:04 +00:00
2020-10-05 21:10:16 +00:00
publish: node_modules
2017-12-03 11:15:02 +00:00
git push -u --tags origin master
npm publish
2020-10-05 21:10:16 +00:00
update: node_modules build
2022-07-29 23:55:48 +00:00
node bin/updates.js -cu -e registry-auth-token
2021-08-23 07:44:25 +00:00
rm package-lock.json
npm install
2020-12-22 20:29:00 +00:00
@touch node_modules
2019-05-06 21:33:15 +00:00
2020-10-05 21:10:16 +00:00
patch: node_modules test
2022-06-30 18:41:16 +00:00
npx versions -Cc 'make --no-print-directory build' patch
2020-08-13 18:37:05 +00:00
@$(MAKE) --no-print-directory publish
2017-12-03 11:15:02 +00:00
2020-10-05 21:10:16 +00:00
minor: node_modules test
2022-06-30 18:41:16 +00:00
npx versions -Cc 'make --no-print-directory build' minor
2020-08-13 18:37:05 +00:00
@$(MAKE) --no-print-directory publish
2017-12-03 11:15:02 +00:00
2020-10-05 21:10:16 +00:00
major: node_modules test
2022-06-30 18:41:16 +00:00
npx versions -Cc 'make --no-print-directory build' major
2020-08-13 18:37:05 +00:00
@$(MAKE) --no-print-directory publish
2019-05-06 21:33:15 +00:00
2020-08-18 21:06:38 +00:00
.PHONY: lint test unittest build publish deps update patch minor major