apache / cordova-coho

Apache Cordova coho
Apache License 2.0
33 stars 62 forks source link

Handle multiple modules within a single repo. #85

Closed TimBarham closed 9 years ago

TimBarham commented 9 years ago

This change includes logic to handle multiple modules within a single repo, and adds specific handling for the cordova-serve module in the cordova-lib repo. It also generalizes some of the existing logic for modules within a repo (that formerly was specific to cordova-lib). Specific changes:

  1. Adds support for repos specifying a path to their module, when it is not at the top level.
  2. Adds support for a repo entry actually being a module within a repo.
  3. Adds Cordova Serve to the list of repos, it actually being a module within the Cordova Lib repo.
  4. When calling computeReposFromFlag(), the caller can request to just get repos (the default) or to get modules. If just repos, then where the list would include two entries that point to the same repo, only one is returned (the 'base' module is prioritized). When modules are requested, then all entries are returned. The idea here is that actions that work on repos only want unique repos. Actions that work on modules (like packaging, license checks etc) want modules.
  5. The following repo based commands now work on modules:
    • audit-license-headers
    • check-license
    • create-archive
    • last-week
    • print-tags
  6. findMostRecentTag() can now be provided a prefix, in which case it will find the most recent tag with that prefix. The prefix can be used by modules other than the primary module to differentiate their versions.
  7. Added update-release-notes command that will update a module's release notes picking commits that are unique to the module's path (see repoutil.getRepoIncludePath())
  8. Added repoutil.getRepoIncludePath() method that determines a path to provide git log so it only includes commits unique to a module. For the base module, this will include commits in the root directory and the base module's directory. For other modules, it will only include changes in the module's directory.
TimBarham commented 9 years ago

Ok, @stevengill, let me know what you think :smile:. In particular, do you think the update-release-notes command will solve the issue you mentioned - picking the commits just for the desired module?

stevengill commented 9 years ago

Wow! @TimBarham this looks great! I will keep testing and playing around with it. But I'd say merge it in. We can make fixes where needed as they come up.

TimBarham commented 9 years ago

Thanks @stevengill! Will merge.