Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

switch from CircleCI -> local release process #3054

Merged
merged 3 commits into from
Jul 19, 2017
Merged

switch from CircleCI -> local release process #3054

merged 3 commits into from
Jul 19, 2017

Conversation

jkillian
Copy link
Contributor

Warning: When this PR is merged NPM_TOKEN should be deleted from the CircleCI environment variables.

Overview of change:

Switches from a GH/CircleCI based publishing flow to a local one. This allows us to add contributors to TSLint without giving them publishing/releasing permissions.

Is there anything you'd like reviewers to focus on?

Does the local publishing script seem reasonable? Does re-cloning the repo to a temporary directory seem reasonable? I tested the script myself, but obviously didn't publish an actual release.

Possible improvements to this PR:

  • We could probably automate the creation of the git tag as well. For now, I decided to leave it as a manual step (since you have to paste the changelog into GH anyways).
  • I only test the build locally with one version of TS. We could do what we do on CircleCI and make publish:local run the tests with multiple versions of TS.

@IllusionMH
Copy link
Contributor

In theory it is possible to use Circle CI API call to confirm that build for supposed release commit hash is successful.

For multiple versions tests I tried to use Docker, but on Windows there is problems on linking step during yarn install (no problems with npm). However Mac may not have this problem.

@jkillian
Copy link
Contributor Author

Both interesting ideas @IllusionMH! I'll leave those experiments for a future PR though, this one is primarily to unblock us so we can add collaborators. Publishing improvements will definitely be possible though 😁

README.md Outdated
5. Push your branch to GitHub and make a PR
6. Once your PR is merged, wait for the tests to pass on CircleCI for develop
7. Create a "Release" on GitHub with the proper tag version and notes from the changelog
8. Run 'yarn run publish:local 4.1.0' (replace with the appropriate tag name for the release)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought you need -- to forward arguments to the script?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that's only needed if you're trying to pass dash options (like passing -o to your script or something like that)

echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
chmod 0600 .npmrc
if [[ $# -ne 1 ]]; then
echo "usage: yarn run publish:local gitTagToPublish"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we grab this from echo 'console.log("./package.json").version' | node or something similar?

Copy link
Contributor Author

@jkillian jkillian Jul 18, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm good point, I actually use $npm_package_version below. Originally I was going to make us pass in an explicit commit hash (so you were sure of what version of code you were publishing)

@adidahiya adidahiya merged commit c32bdc4 into master Jul 19, 2017
@adidahiya adidahiya deleted the jk/build branch July 19, 2017 17:06
@adidahiya
Copy link
Contributor

I've deleted $NPM_TOKEN from CircleCI.

HyphnKnight pushed a commit to HyphnKnight/tslint that referenced this pull request Apr 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants