Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(brew-bump): fix homebrew bump script #5025

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

Merged
jsjoeio merged 7 commits into main from jsjoeio/homebrew-fix-script-v2
Mar 29, 2022

Conversation

Copy link
Contributor

@jsjoeio jsjoeio commented Mar 23, 2022

This PR should fix the brew-bump script that runs when we publish releases.

Testing

I tested this in a separate PR with the --dry-run flag and received no errors. I didn't try without --dry-run but can separately if requested.

Here is how I tested: https://github.com/coder/code-server/pull/5023/files

Fixes #4950

@jsjoeio jsjoeio added ci Issues related to ci chore Related to maintenance or clean up labels Mar 23, 2022
@jsjoeio jsjoeio self-assigned this Mar 23, 2022
Copy link

github-actions bot commented Mar 23, 2022
edited
Loading

✨ code-server docs for PR #5025 is ready! It will be updated on every commit.

@jsjoeio jsjoeio temporarily deployed to npm March 23, 2022 22:35 Inactive
Copy link

codecov bot commented Mar 23, 2022
edited
Loading

Codecov Report

Merging #5025 (aca716d) into main (18e19d2) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@
## main #5025 +/- ##
=======================================
 Coverage 71.30% 71.30% 
=======================================
 Files 30 30 
 Lines 1683 1683 
 Branches 373 373 
=======================================
 Hits 1200 1200 
 Misses 413 413 
 Partials 70 70 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18e19d2...aca716d. Read the comment docs.

# otherwise, it will 404 and won't open a PR to bump version on homebrew/homebrew-core
needs: npm
runs-on: macos-latest
runs-on: ubuntu-latest
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🛠️ Homebrew runs on Linux and Linux runners are more available (anecdotally) than macOS runners. Maybe it'll save some time.

code-asher reacted with rocket emoji
git config user.name github-actions
git config user.email github-actions@github.com
git config user.name cdrci
git config user.email opensource@coder.com
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wasn't sure if I should use a real email or a fake one. Opted for a legit one in case something happened with this PR and someone needed to contact us 🤷🏼‍♂️

Copy link
Member

@code-asher code-asher Mar 29, 2022

Choose a reason for hiding this comment

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

Smart 👍

export HOMEBREW_GITHUB_API_TOKEN="$HOMEBREW_GITHUB_API_TOKEN"
export GIT_ASKPASS="$PATH_TO_GIT_ASKPASS"
git push "https://$GITHUB_USERNAME@github.com/$GITHUB_USERNAME/$REPO.git" --all

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Based on this comment, using that setup homebrew action means we shouldn't have to keep a fork up-to-date and in testing things, it worked.

And to confirm, you can see in the PR description that brew bump-formula-pr with --dry-run worked even though cdrci's fork is behind

image

Copy link
Member

@code-asher code-asher Mar 29, 2022

Choose a reason for hiding this comment

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

Wow, great news! I guess the issue we ran into was an edge case.

jsjoeio reacted with hooray emoji
@jsjoeio jsjoeio marked this pull request as ready for review March 23, 2022 22:38
@jsjoeio jsjoeio requested a review from a team March 23, 2022 22:38
@jsjoeio jsjoeio temporarily deployed to npm March 23, 2022 22:42 Inactive
@jsjoeio jsjoeio temporarily deployed to npm March 25, 2022 22:10 Inactive
Copy link
Contributor Author

jsjoeio commented Mar 29, 2022

export HOMEBREW_GITHUB_API_TOKEN="$HOMEBREW_GITHUB_API_TOKEN"
export GIT_ASKPASS="$PATH_TO_GIT_ASKPASS"
git push "https://$GITHUB_USERNAME@github.com/$GITHUB_USERNAME/$REPO.git" --all

Copy link
Member

@code-asher code-asher Mar 29, 2022

Choose a reason for hiding this comment

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

Wow, great news! I guess the issue we ran into was an edge case.

jsjoeio reacted with hooray emoji
@jsjoeio jsjoeio temporarily deployed to npm March 29, 2022 17:48 Inactive
@jsjoeio jsjoeio temporarily deployed to npm March 29, 2022 23:36 Inactive
@jsjoeio jsjoeio merged commit 8316a27 into main Mar 29, 2022
@jsjoeio jsjoeio deleted the jsjoeio/homebrew-fix-script-v2 branch March 29, 2022 23:58
TinLe pushed a commit to TinLe/code-server that referenced this pull request Apr 23, 2022
* fix: source lib.sh in docker-buildx-push for tagging version
* chore: use ubuntu and update git config homebrew job
* refactor: simplify brew-bump.sh script
* Revert "fix: source lib.sh in docker-buildx-push for tagging version"
This reverts commit 2f7a361.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@code-asher code-asher code-asher approved these changes

Labels
chore Related to maintenance or clean up ci Issues related to ci
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[Chore]: fix brew workflow

AltStyle によって変換されたページ (->オリジナル) /