-
Notifications
You must be signed in to change notification settings - Fork 274
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
🔖 Release 1.8.7 #506
base: main
Are you sure you want to change the base?
🔖 Release 1.8.7 #506
Conversation
dbce000
to
6743fab
Compare
I've published a build from this branch on the releases page: |
Not sure if you saw my comment: I think testing & releasing #496 or #503 (the 1-line code change is exactly the same in both of them) should solve the main problem of iOS app versions showing up as Mac app versions, while 1.8.7 beta 1 didn't fix it for me (on macOS 12.7.x on an Intel). Let me know if I can help get some or all of the fixes out. Happy new year. Thanks. |
6743fab
to
b797ce7
Compare
b797ce7
to
8318935
Compare
Adds sonoma and ventura
v1.8.7-beta.1
8318935
to
666e505
Compare
The release run for v1.8.7-beta.51 was successful, skipping the @rgoldberg I resolved the lint errors while waiting on release builds. I'm going to kick off the real |
@phatblat I don't see any PR (open or closed) for mas 1.8.7 in the Homebrew core repo. I assume the formula updates are done via a PR. I see the PR in the mas tap. For some reason, it's marked as a WIP. I assume it should be switched to be a normal PR. |
This file path was added here the Also, my understanding is that homebrew uses the |
The PR for the new version didn't work. I'll investigate and retry.
Yeah, it should but I forgot I left |
The release failed again. Looks like the issue was with the
|
In mas-cli/homebrew-tap#45 is the - root_url "https://github.com/mas-cli/mas/releases/download/v1.8.7-beta.1"
+ root_url "https://github.com/mas-cli/mas/releases/download/vv1.8.7" |
|
Got a little bit further by adding
|
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 should investigate release.yml
more, but I might not have time to do too much more with with now, so I figured I'd submit my review. I might change/add a few comments.
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.
Why not just call script/bottle instead of this script?
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.
This script should probably be renamed generate_brew_formula
or brew_formula
.
By default, it should generate the core formula, but accept an optional --tap
to generate the tap formula instead.
Generating the Package.swift
should be a separate script (right now, that can be done via script/version --write
, but maybe we should move that functionality to a new script/generate_package_swift
or script/package_swift
script to keep everything modular).
Instead of always modifying an existing formula on the file system (Homebrew/mas.rb
or Homebrew/mas-tap.rb
), it should generate one script at a time from scratch, printing the contents to stdout, with the caller redirecting that to a file.
When our release process calls this script, each output formula should be redirected to a file under a git-ignored directory (probably just make some directory under .build/
).
This will allow us to remove Homebrew/mas.rb
& Homebrew/mas-tap.rb
from the repo, which will prevent accidental check ins of different versioned formulae in the repo or version mismatches between varios files, git tags, or released artifacts.
This script shouldn't accept a revision. The revision should be obtained from version tag. Otherwise, things can get out of sync.
It will also make everything more modular. You should be able to generate one output by itself instead of being locking into generating all 3. You should be able to just see the output instead of needing to write a file. You should be able to write output wherever you want, instead of being constrained by what's in the script.
Also, a general note: I've normally seen only seen environment variable name in upper case, with other variables in lower case.
exit 1 | ||
fi | ||
|
||
LOCAL_MAS_FORMULA_PATH="Homebrew/mas.rb" |
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'd rename LOCAL_MAS_FORMULA_PATH
as LOCAL_CORE_FORMULA_PATH
. Both this and LOCAL_TAP_FORMULA_PATH
are for mas, the distinguishing difference is one is for core, the other for tap.
LOCAL_MAS_FORMULA_PATH="Homebrew/mas.rb" | |
LOCAL_CORE_FORMULA_PATH="Homebrew/mas.rb" |
sd '( +tag: +)"[^"]+"' "\$1\"${MAS_VERSION}\"" "${file}" | ||
sd '( +revision: +)"[^"]+"' "\$1\"${REVISION}\"" "${file}" | ||
sd '( +root_url "https://github.com/mas-cli/mas/releases/download/).+' "\${1}${MAS_VERSION}\"" "${file}" |
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.
If we generate output from a script instead of modifying files on the file system (as per my comment on this file as a whole), we can get rid of the sd
dependency.
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.
Remove this from git. Generate the formula as per my file comment on script/version_bump
.
script/bootstrap -f | ||
|
||
- name: 🔧 Configure Git Author | ||
if: env.PRE_RELEASE == 'false' |
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.
if: env.PRE_RELEASE == 'false' |
ref: ${{ needs.start.outputs.release_branch }} | ||
|
||
- name: 👢 Bootstrap | ||
if: env.PRE_RELEASE == 'false' |
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.
if: env.PRE_RELEASE == 'false' |
PRE_RELEASE: ${{ needs.start.outputs.pre_release }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
if: env.PRE_RELEASE == 'false' |
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.
if: env.PRE_RELEASE == 'false' |
env: | ||
PRE_RELEASE: ${{ needs.start.outputs.pre_release }} |
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 assume this syntax will work.
env: | |
PRE_RELEASE: ${{ needs.start.outputs.pre_release }} | |
if: ${{ needs.start.outputs.pre_release }} == 'false' |
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 suspect it will.
# Error: No available formula or cask with the name "mas-cli/tap/mas". | ||
- name: 🚰 Checkout mas tap | ||
run: | | ||
rm -rf /opt/homebrew/Library/Taps |
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.
/opt/homebrew
should be replaced everywhere by "$(brew --prefix)"
, just in case someone on Intel uses act
to test actions locally, or in case brew uses some other prefix in the future.
Partial #506 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
|
||
- id: dry_run | ||
run: | | ||
echo "DRY_RUN=false" >>"$GITHUB_OUTPUT" |
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.
Why is $GITHUB_OUTPUT
used? the linked documentation above uses "${GITHUB_ENV}"
.
echo "DRY_RUN=false" >>"$GITHUB_OUTPUT" | |
echo "DRY_RUN=false" >>"${GITHUB_ENV}" |
|
||
- id: mas_version | ||
run: | | ||
echo "MAS_VERSION=${{ github.event.release.tag_name }}" >>"$GITHUB_OUTPUT" |
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.
See above.
echo "MAS_VERSION=${{ github.event.release.tag_name }}" >>"$GITHUB_OUTPUT" | |
echo "MAS_VERSION=${{ github.event.release.tag_name }}" >>"${GITHUB_ENV}" |
|
||
- id: pre_release | ||
run: | | ||
echo "PRE_RELEASE=$(grep -q '-' <<<$MAS_VERSION && echo 'true' || echo 'false')" >>"$GITHUB_OUTPUT" |
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.
See above.
echo "PRE_RELEASE=$(grep -q '-' <<<$MAS_VERSION && echo 'true' || echo 'false')" >>"$GITHUB_OUTPUT" | |
echo "PRE_RELEASE=$(grep -q '-' <<<$MAS_VERSION && echo 'true' || echo 'false')" >>"${GITHUB_ENV}" |
|
||
- id: release_branch | ||
run: | | ||
echo "RELEASE_BRANCH=releases/release-${{ github.event.release.tag_name }}" >>"$GITHUB_OUTPUT" |
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.
See above.
echo "RELEASE_BRANCH=releases/release-${{ github.event.release.tag_name }}" >>"$GITHUB_OUTPUT" | |
echo "RELEASE_BRANCH=releases/release-${{ github.event.release.tag_name }}" >>"${GITHUB_ENV}" |
Release branch for
1.8.7
.This branch includes the new release workflow #510.