Skip to content

Commit

Permalink
No longer using the releases/ folder to publish to NPM.
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
ronyeh committed Nov 15, 2021
1 parent 007c8ce commit 716d728
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 93 deletions.
73 changes: 0 additions & 73 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -239,16 +238,6 @@ export default Vex;`;
},
},
},
release: {
files: [
{
expand: true,
cwd: BUILD_DIR,
src: ['*.js', 'docs/**', '*.map'],
dest: RELEASES_DIR,
},
],
},
reference: {
files: [
{
Expand All @@ -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] },
},
Expand All @@ -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');
Expand Down Expand Up @@ -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.');
});
};
15 changes: 0 additions & 15 deletions component.json

This file was deleted.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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;",
Expand Down

0 comments on commit 716d728

Please sign in to comment.