eslint / eslint-release

The ESLint release tool
Other
24 stars 11 forks source link

Enable the ability to choose a different branch to work from #42

Closed nzakas closed 4 years ago

nzakas commented 4 years ago

Right now, eslint-release always works off the master branch. In order to convert our repos to use main instead of master, we'll need to update eslint-release to be able to work on a different branch.

There are a couple different ways I can envision this working:

  1. We do a semver-major release of eslint-release that hardcodes main as the branch it uses. This would mean that repos switching to main first would use the latest version while other repos could continue using the older version.
  2. We allow the branch to be passed in on the command line. We could default to master and allow main to be passed in (though at some point we'd probably want to switch the default).
kaicataldo commented 4 years ago

One more alternative that builds on the two suggestions above: could we have it check for the existence of main and use it instead of master if it exists?

nzakas commented 4 years ago

Ah, that’s an interesting alternative. It actually looks like we are only directly referencing the branch in one spot:

https://github.com/eslint/eslint-release/blob/master/lib/release-ops.js

If we change that to just “git push —tags”, I think it should still work (we should upgrade git on the Jenkins server to the latest just in case). That way, we could just update an individual package’s release job on Jenkins to pull whichever branch is appropriate.

kaicataldo commented 4 years ago

Even better! :+1:

nzakas commented 4 years ago

I'm working on this.