Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running task on all subrepositories #41

Closed
Reinmar opened this issue Nov 23, 2015 · 4 comments
Closed

Running task on all subrepositories #41

Reinmar opened this issue Nov 23, 2015 · 4 comments
Assignees
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Nov 23, 2015

In #36 we are discussing how to run some common task on all subrepositories. For example, we need to change the years in the copyright header. We could run a task directly from the ckeditor5 repo on each of its subrepositories, but this means that this task would need to know everything about its subrepositories (e.g. which files are ignored). This knowledge of course is discoverable, but it would make more sense if subrepositories were running the task themselves.

The idea that we have is that subrepositories will have a grunt task (or some other API) which will accept a path to a file with a task source and name of that task. This way the main repo will be able to run one of its tasks in all subrepos. The task's code will be kept in the main repo, but the task will be run directly in subrepos, so the logic on which files it should be run will be local.

@Reinmar
Copy link
Member Author

Reinmar commented Jun 14, 2016

The idea is to implement a gulp task called e.g. exec.

dev/tasks/exec/
  tasks.js
  functions/
    package.json // Dependencies of existing functions.
    bump-year.js

Usage (with param):

gulp exec bump-year 2017

Contents of bump-year.js:

'use strict';

/** 
 * {String} packagePath
 * {Minimatch} params
 */
module.exports = ( packagePath, params ) => {
};

@Reinmar
Copy link
Member Author

Reinmar commented Jun 14, 2016

First use case that we have for this task is #149. But there are obvious other ones like bumping year, dependencies in package.json, updating JSCS rules, etc.

@Reinmar
Copy link
Member Author

Reinmar commented Jun 15, 2016

I've just thought that we could make gulp status and gulp update aliases for gulp exec status and gulp exec update, but that would mean that all their deps need to be kept in the main package.json so it would create a bit confusing situation. Hence, it's better to not move them and keep exec for special occasions only.

@maxbarnas
Copy link
Contributor

What has been determined so far:

  • tasks inside ckeditor5 repository will have all the knowledge about files that have to be processed
  • script should obey rules in .gitignore files in each repository (and possibly other configuration files of this kind)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants