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: Add update script #30

Merged
merged 8 commits into from
Aug 9, 2024
Merged

feat: Add update script #30

merged 8 commits into from
Aug 9, 2024

Conversation

another-rex
Copy link
Collaborator

This is the update script used to create the #29 release

Copy link
Contributor

@hogo6002 hogo6002 left a comment

Choose a reason for hiding this comment

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

Thanks!

update-script.py Outdated Show resolved Hide resolved
Copy link
Member

@michaelkedar michaelkedar left a comment

Choose a reason for hiding this comment

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

This feels like it could be a bash script

update-script.py Outdated
Comment on lines 41 to 51
print('update-script.py <target-tag>')
print()
print('Performs a series of git merges to update all references of the previous version to the specified tag of osv-scanner. This script expects upstream remote to be named `upstream`')
print('1. Fetch upstream main branch')
print('2. Create new branch on the most recent version tag (the last release commit)')
print('3. Update references to the old osv-scanner tag to the new tag, and make the first commit')
print('4. Update references to the old .github/workflows/osv-scanner-reusable.yml version to the newly made commit in the last step. Make the second commit.')
print('5. Finally update the unified workflow to point to the commit made in step 4, perform the third commit.')
print()
print('After this script is complete, push the new branch and create a PR. This PR must be merged via a normal git merge commit, NOT a squash commit.')
print('Then create the new release tag on this merged PR commit.')
Copy link
Member

Choose a reason for hiding this comment

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

Is printing one multiline string better or worse?

    print('''\
update-script.py <target-tag>

Performs a series of...
1. Fetch...
...''')

    # or maybe
    print('update-script.py <target-tag>\n'
          '\n'
          'Performs a series of...\n'
          '...'
    )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Went with the multiline string, which is a bit better?

@another-rex another-rex changed the title Add update script feat: Add update script Aug 9, 2024
@another-rex another-rex merged commit b756d11 into main Aug 9, 2024
4 checks passed
@another-rex another-rex deleted the update-script branch August 9, 2024 03:50
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.

3 participants