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: master version in lerna.json (instead of root package.json) #6445

Merged
merged 4 commits into from
Feb 25, 2020

Conversation

eladb
Copy link
Contributor

@eladb eladb commented Feb 25, 2020

Use lerna.json to master the repo version instead of the root package.json.

Move standard-version configuration to .versionrc.json and consult it when aligning the repo version to determine where the version is mastered.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

Use lerna.json to master the repo version instead of the root package.json.

Move standard-version configuration to .versionrc.json and consult it when aligning the repo version to determine where the version is mastered.
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 25, 2020
returns the current repo version, and reused by align-version. then we can use it in our AutoBump build project
instead of hard-coding the fact that lerna.json is where we master the version.
@eladb eladb requested review from clareliguori, iliapolo and rix0rrr and removed request for clareliguori February 25, 2020 16:17
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 096b4d0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

1 similar comment
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 096b4d0
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 3860fba
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@rix0rrr rix0rrr added the pr/do-not-merge This PR should not be merged at this time. label Feb 25, 2020
Copy link
Contributor

@rix0rrr rix0rrr left a comment

Choose a reason for hiding this comment

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

Approved but with the note that I had expected lerna to make this simpler. If it's not, then I'm sad and my comments are of less value :)

@@ -9,11 +9,11 @@ scriptdir=$(cd $(dirname $0) && pwd)
# go to repo root
cd ${scriptdir}/..

files="lerna.json $(find . -name package.json | grep -v node_modules | grep -v "^./package.json" | xargs)"
files="$(find . -name package.json | grep -v node_modules | xargs)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. I guess I had assumed this would just be a lerna version command if we put the version in lerna.json. Isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lerna version doesn’t take care of peer dependencies and occasionally misses things. This is more straightforward I believe.

--bumpFiles package.json \
--release-as ${version} \
--skip.tag=true \
--releaseCommitMessageFormat="chore(release): v{{currentTag}}" \
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not in the .versionrc.json file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the default.

@@ -0,0 +1,5 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

Personally prefer the command line flags version, but whatever suits you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Me too, but I couldn’t find a way to specify the packageFiles type through the command line so I had to revert to this abomination.

@eladb eladb removed the pr/do-not-merge This PR should not be merged at this time. label Feb 25, 2020
@eladb eladb self-assigned this Feb 25, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 6857409
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Feb 25, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify
Copy link
Contributor

mergify bot commented Feb 25, 2020

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit b04accc into master Feb 25, 2020
@mergify mergify bot deleted the benisrae/use-lerna-verison branch February 25, 2020 21:57
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-qxepHUsryhcu
  • Commit ID: 61f283d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants