Skip to content

Conversation

@dshemetov
Copy link
Contributor

@dshemetov dshemetov commented Jun 7, 2024

Summary:

Started from this conversation.

Fix the release CI to accept any version number and major, minor, patch as its argument. My test script for the versionNumber logic is below.

Notes:

# Try (major|minor|patch|5.3.0|blah|3.2.2.2)
versionName=major
allowed_pattern="^(major|minor|patch|[0-9]+\.[0-9]+\.[0-9]+)$"

if [[ ! $versionName =~ $allowed_pattern ]]; then
  echo "\nInvalid version name: $versionName"
  exit 1
fi

if [[ $versionName =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
  NEXT_TAG="$versionName"
else
  NEXT_TAG=$(bump2version --dry-run --list $versionName | grep ^new_version | sed -r s,"^.*=",,)
fi
echo "next_tag=$NEXT_TAG"

Prerequisites:

  • Unless it is a documentation hotfix it should be merged against the dev branch
  • Branch is up-to-date with the branch to be merged with, i.e. dev
  • Build is successful
  • Code is cleaned up and formatted

@dshemetov dshemetov requested a review from rzats June 7, 2024 04:41
@dshemetov dshemetov requested a review from melange396 June 7, 2024 18:44
@dshemetov dshemetov changed the title wip(pyclient): use bump-my-version fix(pyclient ci): use bump-my-version Jun 7, 2024
@dshemetov dshemetov changed the title fix(pyclient ci): use bump-my-version fix(pyclient ci): validate version arg in create-release Jun 7, 2024
@dshemetov dshemetov requested a review from melange396 June 7, 2024 23:27
Copy link
Contributor

@rzats rzats left a comment

Choose a reason for hiding this comment

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

lgtm!

@dshemetov dshemetov requested a review from melange396 June 17, 2024 21:47
* add comments
* revert bumpversion configs

Co-authored-by: george <[email protected]>
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@dshemetov
Copy link
Contributor Author

Cleaned up the commit log by squashing the edits.

@dshemetov dshemetov merged commit e41c741 into rzatserkovnyi/client-release-decouple Jun 18, 2024
@dshemetov dshemetov deleted the ds/bump-version branch June 18, 2024 00:44
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.

4 participants