-
Notifications
You must be signed in to change notification settings - Fork 246
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
feat: add autobump script #1335
Conversation
The title of this Pull Request does not conform with [Conventional Commits] guidelines. It will need to be adjusted before the PR can be merged. |
4 similar comments
The title of this Pull Request does not conform with [Conventional Commits] guidelines. It will need to be adjusted before the PR can be merged. |
The title of this Pull Request does not conform with [Conventional Commits] guidelines. It will need to be adjusted before the PR can be merged. |
The title of this Pull Request does not conform with [Conventional Commits] guidelines. It will need to be adjusted before the PR can be merged. |
The title of this Pull Request does not conform with [Conventional Commits] guidelines. It will need to be adjusted before the PR can be merged. |
971da5d
to
48a9c8a
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
efd4cde
to
9cedf03
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine with a central CHANGELOG. If we wanted, we could just copy this CHANGELOG file to all modules, but that's an overkill
@@ -0,0 +1,38 @@ | |||
#!/usr/bin/env node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we extract this from CDK into a stupid little node module instead of copying and pasting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm cool with it. Cute name ideas?
@@ -0,0 +1,20 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
|
||
# Generate CHANGELOG and create a commit (see .versionrc.json) | ||
npx standard-version --release-as ${version} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am totally fine with moving to standard-version here
9cedf03
to
59f0619
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
59f0619
to
5a3bda7
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@MrArnoldPalmer shall we get this merged? |
Yeah I'm fixing the tests here to remove version #s instead of aligning before tests. Will do this now. |
ea65fcb
to
80f812a
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
80f812a
to
8fe4771
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
8fe4771
to
f83740e
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@@ -150,6 +150,6 @@ | |||
"name": "IBaseInterface" | |||
} | |||
}, | |||
"version": "1.1.0", | |||
"fingerprint": "piaiqNxSj1XkycnXHPRG4697t6DpKGgkya6effAlXKI=" | |||
"version": "0.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh cool we no longer need to update tests in version bumps!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this does add some complexity to how we build though.
Since tests rely on version numbers not changing, we have to build+test before we run align-version in our build pipeline. Then after running align-version, I'm wary of running package.sh without running build again because if for some reason we changed how align-version works or otherwise do something that could affect the build, then I'd like to know about that failure.
Because of this I actually changed buildspec.yml to do build+test+align-version+build+pack. This seems to be the safest thing for now? @eladb am I being irrational by worrying about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that sounds like what I would do. Not ideal but will work I believe until we figure out some other way...
Changes all version numbers in package.json to 0.0.0. to centralize current version to a single location in lerna.json. This removes noise from release PRs.
Adds scripts for aligning package versions to the current version. Changes content of
scripts/bump.sh
to only bumpNote:
Changing to using
standard-version
for bumping and changelog from lerna means that all changes are documented in the rootCHANGELOG.md
instead of within individual package folders.It is possible to continue to use lerna to bump versions, however a couple of issues come up with that.
running
lerna publish
orlerna version
requires you to be attached to a branch. Most CI environments check out an individual commit and are are in a detached state. This means we would have to re-attach somehow.bumping with lerna replaces all of the
"version": "0.0.0"
fields in package'spackage.json
files with the newly bumped version. So release PRs still have the version noise.In summay, if we want to have changelogs in package dirs, we probably can't have "v0.0.0" in source code. If we want "v0.0.0" in source code, we should go this way and have a central changelog. Central version = central changelog.
Example Release PR
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.