Skip to content

Commit 88dfb68

Browse files
committed
Add a post-branching Grunt task
This new `post-branching` task is meant for any tasks that should be run immediately after creating a new numbered branch. In addition to the pre-existing `replace:workflow-references-local-to-remote` task, a new `clean:workflows` task is being added that deletes the workflow files that are only intended for `trunk`.
1 parent f2212d9 commit 88dfb68

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

Gruntfile.js

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,23 @@ module.exports = function(grunt) {
216216
cwd: WORKING_DIR,
217217
src: []
218218
},
219-
qunit: ['tests/qunit/compiled.html']
219+
qunit: ['tests/qunit/compiled.html'],
220+
221+
// This is only meant to run within a numberd branch after branching has occurred.
222+
workflows: [
223+
// Reusable workflows should only be called from `trunk` in branches.
224+
'.github/workflows/reusable-*.yml',
225+
// These workflows are only intended to run from `trunk`. Delete them to avoid any confusion.
226+
'.github/workflows/commit-built-file-changes.yml',
227+
'.github/workflows/failed-workflow.yml',
228+
'.github/workflows/install-testing.yml',
229+
'.github/workflows/test-and-zip-default-themes.yml',
230+
'.github/workflows/install-testing.yml',
231+
'.github/workflows/slack-notifications.yml',
232+
'.github/workflows/test-coverage.yml',
233+
'.github/workflows/test-old-branches.yml',
234+
'.github/workflows/upgrade-testing.yml'
235+
]
220236
},
221237
file_append: {
222238
// grunt-file-append supports only strings for input and output.
@@ -1708,6 +1724,11 @@ module.exports = function(grunt) {
17081724
'copy:workflow-references-remote-to-local',
17091725
]);
17101726

1727+
grunt.registerTask( 'post-branching', [
1728+
'clean:workflows',
1729+
'replace:workflow-references-local-to-remote'
1730+
]);
1731+
17111732
/**
17121733
* Build verification tasks.
17131734
*/

0 commit comments

Comments
 (0)