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

feat: allow labels to bump patch/minor versions #50

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

fuziontech
Copy link
Member

We need to make sure that every land to master bumps the version so people can pin a version with confidence. This allows that.

Copy link
Contributor

@dmarticus dmarticus left a comment

Choose a reason for hiding this comment

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

yee

Comment on lines +39 to +46
if [ "${{ steps.bump-type.outputs.type }}" == "minor" ]; then
new_version="$major.$((minor + 1)).0"
else
new_version="$major.$minor.$((patch + 1))"
fi

sed -i "s/const Version = \"$current_version\"/const Version = \"$new_version\"/" version.go
echo "::set-output name=new_version::$new_version"
Copy link
Contributor

Choose a reason for hiding this comment

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

deploy scripts always look so dastardly; I love it.

Comment on lines +23 to +28
run: |
if [[ $(GITHUB_TOKEN=${{ secrets.POSTHOG_BOT_GITHUB_TOKEN }} gh pr view ${{ github.event.pull_request.number }} --json labels -q '.labels[].name' | grep -q "minor") ]]; then
echo "type=minor" >> $GITHUB_OUTPUT
else
echo "type=patch" >> $GITHUB_OUTPUT
fi
Copy link
Contributor

Choose a reason for hiding this comment

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

good call not supporting major version bumps; I don't want to deal with v2 yet.

Copy link
Member Author

Choose a reason for hiding this comment

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

1000% - that will be a manual process anyways

@fuziontech fuziontech merged commit 24bae22 into master Aug 8, 2024
1 check passed
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.

2 participants