From 716d728d488072346a91e5fae4e185f34e296dab Mon Sep 17 00:00:00 2001 From: "Ron B. Yeh" Date: Sun, 14 Nov 2021 10:40:34 -0800 Subject: [PATCH] No longer using the releases/ folder to publish to NPM. Temporarily removing diff of current vs release upon git push, since we removed the releases/*. We currently rely on npm run test:reference to do the visual diffing, and will reintroduce automated visual diffing in a later PR (e.g., via a script that downloads the previous release from NPM). grunt-bump and grunt-release are a bit too automated / magical. We can revisit npm release automation via an interactive script that uses native npm commands, such as: npm version npm pack npm publish --dry-run This automation script can also use native git commands like: git commit -m "VexFlow 4.0.0" git tag -a 5.0.0 -m "VexFlow 5.0.0-beta" --- Gruntfile.js | 73 -------------------------------------------------- component.json | 15 ----------- package.json | 7 ++--- 3 files changed, 2 insertions(+), 93 deletions(-) delete mode 100644 component.json diff --git a/Gruntfile.js b/Gruntfile.js index 432795c0e4..c6da5ab884 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,7 +18,6 @@ const VEX_DEBUG_TESTS = 'vexflow-debug-with-tests'; // Output directories. const BASE_DIR = __dirname; const BUILD_DIR = path.join(BASE_DIR, 'build'); -const RELEASES_DIR = path.join(BASE_DIR, 'releases'); const REFERENCE_DIR = path.join(BASE_DIR, 'reference'); // Global variables that will be set below. @@ -239,16 +238,6 @@ export default Vex;`; }, }, }, - release: { - files: [ - { - expand: true, - cwd: BUILD_DIR, - src: ['*.js', 'docs/**', '*.map'], - dest: RELEASES_DIR, - }, - ], - }, reference: { files: [ { @@ -271,36 +260,6 @@ export default Vex;`; src: ['./src/index.ts'], }, }, - gitcommit: { - releases: { - options: { - message: 'Committing release binaries for new version: <%= pkg.version %>', - verbose: true, - }, - files: [ - { - src: [`${RELEASES_DIR}/*.js`, `${RELEASES_DIR}/*.map`], - expand: true, - }, - ], - }, - }, - bump: { - options: { - files: ['package.json', 'component.json'], - commitFiles: ['package.json', 'component.json'], - updateConfigs: ['pkg'], - createTag: false, - push: false, - }, - }, - release: { - options: { - bump: false, - commit: false, - npm: false, // Run npm publish by hand - }, - }, clean: { build: { src: [BUILD_DIR] }, }, @@ -310,8 +269,6 @@ export default Vex;`; grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks('grunt-typedoc'); - grunt.loadNpmTasks('grunt-release'); - grunt.loadNpmTasks('grunt-bump'); grunt.loadNpmTasks('grunt-git'); grunt.loadNpmTasks('grunt-eslint'); grunt.loadNpmTasks('grunt-webpack'); @@ -387,34 +344,4 @@ export default Vex;`; 'copy:reference', ] ); - - // Release current build. - grunt.registerTask( - 'stage', - 'Build to releases/.', // - [ - // - 'default', - 'qunit', - 'copy:release', - ] - ); - - // Increment package version and generate releases. Does NOT automatically publish to NPM. - grunt.registerTask( - 'publish', - 'Generate releases.', // - [ - // - 'bump', - 'stage', - 'gitcommit:releases', - 'release', - 'alldone', - ] - ); - - grunt.registerTask('alldone', 'Publish VexFlow NPM.', () => { - grunt.log.ok('NOT YET DONE: Run `npm publish` now to publish NPM.'); - }); }; diff --git a/component.json b/component.json deleted file mode 100644 index d357223165..0000000000 --- a/component.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "vexflow", - "version": "3.0.9", - "author": "Mohit Muthanna Cheppudira", - "description": "A JavaScript library for rendering music notation and guitar tablature", - "scripts": ["releases/vexflow-debug.js"], - "repository": "0xfe/vexflow", - "license": "MIT", - "tags": [ - "music", - "notation", - "guitar", - "tablature" - ] -} diff --git a/package.json b/package.json index e0a16e3f0f..f360ba4220 100644 --- a/package.json +++ b/package.json @@ -95,13 +95,10 @@ "reference": "grunt reference", "lint": "grunt eslint", "qunit": "grunt test", - "generate:current": "node ./tools/generate_png_images.js ../build ./build/images/current ${VF_GENERATE_OPTIONS}", + "generate:current": "node ./tools/generate_png_images.js ../build ./build/images/current ${VF_GENERATE_OPTIONS}", "generate:reference": "node ./tools/generate_png_images.js ../reference ./build/images/reference ${VF_GENERATE_OPTIONS}", - "generate:blessed": "node ./tools/generate_png_images.js ../releases ./build/images/blessed ${VF_GENERATE_OPTIONS}", - "generate": "npm run generate:current && npm run generate:blessed", - "diff": "./tools/visual_regression.sh blessed", "diff:reference": "./tools/visual_regression.sh reference", - "test": "npm run lint && npm run qunit && npm run generate && npm run diff", + "test": "npm run lint && npm run qunit && npm run generate:current", "test:reference": "npm run lint && npm run qunit && npm run generate:current && npm run generate:reference && npm run diff:reference", "cache:save:reference": "if [ -d ./build/images/reference ]; then rm -rf ./reference/images && mv ./build/images/reference ./reference/images; fi;", "cache:restore:reference": "if [ -d ./reference/images ]; then mv ./reference/images ./build/images/reference; else npm run generate:reference; fi;",