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

chore: release scripts for travis #54

Merged
merged 4 commits into from
Sep 18, 2018
Merged

chore: release scripts for travis #54

merged 4 commits into from
Sep 18, 2018

Conversation

efegurkan
Copy link
Contributor

@efegurkan efegurkan commented Aug 23, 2018

Reference issue: N/A

This PR adds changes to the release scripts and travis config to enable testing melody easier and more flexible at trivago.

With this changes, every push to the master should release a new version to the @next tag with next minor version + commit id. Also for the any branch push it should create a release to the @canary tag.

This also includes a tiny peer dependency updating utility and some prompts before releasing. That should prevent unnecessary patch releases in future.

# CANARY RELEASE WITH COMMIT NAME
# @commit
yarn install && \
yarn lerna publish --skip-git --skip-npm --exact --force-publish=* --canary=commit --registry http://localhost:4873/
Copy link
Collaborator

Choose a reason for hiding this comment

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

localhost:4873 ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's verdaccio's URL .

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true, I forgot to change that one

Add CLI tools/helpers for releasing.
Add peer dependency update util.
Add npm release for @next and @canary releases.
@efegurkan efegurkan changed the title [WIP]chore: release scripts for travis chore: release scripts for travis Aug 27, 2018
@efegurkan
Copy link
Contributor Author

This is ready for the review.

@ayusharma please feel free to jump in and comment.

@coveralls
Copy link

coveralls commented Aug 27, 2018

Pull Request Test Coverage Report for Build 141

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 89.346%

Totals Coverage Status
Change from base Build 112: 0.0%
Covered Lines: 2095
Relevant Lines: 2224

💛 - Coveralls

Copy link
Contributor Author

@efegurkan efegurkan left a comment

Choose a reason for hiding this comment

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

note to self: Don't forget to add CHANGELOG

if [ "$TRAVIS_BRANCH" = "master" ]; then
# RELEASE AS @NEXT
yarn install && \
yarn lerna publish --skip-git --exact --force-publish=* --canary=commit --npm-tag=next --registry https://registry.npmjs.org
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure about --exact. There is nothing mentioned in docs https://lernajs.io/#command-publish

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Melody uses 2.x version of Lerna still. https://github.com/lerna/lerna/tree/2.x#--exact

}

Object.keys(pkgJson.peerDependencies).forEach(dep => {
if (pkgNames.indexOf(dep) > -1) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to use .includes. 😄

Copy link
Collaborator

@ayusharma ayusharma left a comment

Choose a reason for hiding this comment

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

I tested it locally. Added scripts work fine. Looks good to me :)

@pago
Copy link
Contributor

pago commented Aug 30, 2018

@efegurkan Can we get the automated tests to pass?

@efegurkan
Copy link
Contributor Author

efegurkan commented Aug 30, 2018

@pago It has to be just rebased onto master(#55, #56). I have it locally now, I don't have push rights to a branch anymore.

…/ci-release

* 'master' of https://github.com/trivago/melody:
  chore: drops node-7 and adds node-10 support (#55) (#56)
  fix: incorrect `is` method call in melody-types (#20) (#52)
  chore: adds .npmignore for melody packages (#53)
@pago
Copy link
Contributor

pago commented Aug 31, 2018

$ bundlesize
 ERROR  Could not add github status.
        404: Not Found 
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command "yarn bundlesize" failed 3 times.
The command "travis_retry yarn bundlesize" exited with 1.

@ayusharma
Copy link
Collaborator

@pago It's a bug. May be bundlesize version bump can help here. siddharthkp/bundlesize#93 (comment)

@efegurkan
Copy link
Contributor Author

@pago can be also bundlesize token bound to my account? Does it fail on other PR's as well. In that case you need to renew the token.

@frvge
Copy link
Contributor

frvge commented Sep 8, 2018

@efegurkan , @pago , I added PR #63 that updates bundlesize in this branch but I'm not sure if that's all what's needed to get rid of the 404 error. I don't have access to the travis environment AFAIK.

@efegurkan
Copy link
Contributor Author

@frvge ask someone to add you to the github organization. You should be able to add the tokens. I cannot work on this PR anymore you know 🤷‍♂️ :D

#65)

* chore: Update bundlesize, add secret token, remove npm and lerna warnings
* chore: Force non-interactive 'yes' for lerna publish
@pago
Copy link
Contributor

pago commented Sep 14, 2018

Almost there.
@jamesb3ll please add trivagonpm and me as a maintainer for neutrino-preset-melody

I'm not sure why but the npm website currently doesn't list trivagonpm as a maintainer of anything anymore. And @efegurkan seems to have been lost as well.

Once that is done, travis should pass, leaving us with the broken circleci tests on node 6.

@frvge frvge merged commit 549dcb6 into master Sep 18, 2018
@frvge frvge deleted the chore/ci-release branch September 18, 2018 10:12
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

Successfully merging this pull request may close these issues.

5 participants