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

Release improvements #640

Merged
merged 131 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
b774f7e
Fix format violations in `.swiftlint.yml`.
rgoldberg Nov 19, 2024
eba9859
Upgrade danger from 3.18.0 to 3.20.2.
rgoldberg Nov 15, 2024
4c8d21f
Use `/bin/bash` instead of `bash` from the `$PATH` to keep things con…
rgoldberg Nov 15, 2024
7cdd3c4
`event.json` has placeholder values, and incorrect & inconsistent ver…
rgoldberg Nov 15, 2024
30a9daa
mise is installed via `brew bundle`.
rgoldberg Nov 15, 2024
0db6d5d
`clean` seems unnecessary in `bootstrap`.
rgoldberg Nov 15, 2024
41aa732
Remove unused `$echo` variable.
rgoldberg Nov 15, 2024
2c25210
Remove seemingly unnecessary `pushd` & `popd`.
rgoldberg Nov 15, 2024
44f9c5f
Output error to stderr instead of stdout.
rgoldberg Nov 15, 2024
b1936d2
Makefile: Mirror bash by using `${…}` & `$(…)` for all variables & co…
rgoldberg Nov 15, 2024
16dd432
`script/bottle`: reword "better" as "newer".
rgoldberg Nov 15, 2024
491a1b8
Upgrade Xcode dependency to 14.2.
rgoldberg Nov 15, 2024
3918bf2
Obtain path to tap via `brew --repo mas-cli/tap` instead of hardcodin…
rgoldberg Nov 15, 2024
9672313
`release.yml`: remove unnecessary output.
rgoldberg Nov 15, 2024
e83bd1e
`release.yml`: Check `pre_release` once for all of `homebrew-core` jo…
rgoldberg Nov 15, 2024
ea610a5
Improve `script/lint` output.
rgoldberg Nov 15, 2024
9bd0d92
Simplify `script/bootstrap`.
rgoldberg Nov 15, 2024
378f90d
Install tools via Homebrew instead of via mise.
rgoldberg Nov 15, 2024
696d1a3
Fix typo.
rgoldberg Nov 15, 2024
9a0ee97
If a bottle & its checksum are the same for multiple versions of the …
rgoldberg Nov 15, 2024
eca9510
Update Homebrew formula URL.
rgoldberg Nov 15, 2024
b971d4d
Update script usage output.
rgoldberg Nov 15, 2024
615be3b
Use short/abbreviated options for consistency.
rgoldberg Nov 16, 2024
3205a6d
Fix bash subcommand completion.
rgoldberg Nov 16, 2024
06e0f40
Simplify defaults for unsupplied script arguments.
rgoldberg Nov 16, 2024
fc753f6
Replace bash `test` with `[[ ]]`.
rgoldberg Nov 16, 2024
5423569
`cd` into root of mas project at beginning of every bash script.
rgoldberg Nov 16, 2024
2ebda42
Ensure single newline at end of every file.
rgoldberg Nov 16, 2024
3789cbd
Delete unnecessary bash comment.
rgoldberg Nov 16, 2024
4d05199
Use bash `'…'`, `$'…'`, or unquoted word instead of `"…"` whenever po…
rgoldberg Nov 16, 2024
8fa8ae9
Move bash variable to left of test.
rgoldberg Nov 16, 2024
b3dca79
Inline bash variables.
rgoldberg Nov 16, 2024
ce4205e
Write to stderr where appropriate.
rgoldberg Nov 16, 2024
b7a6948
Simplify `script/update_headers`.
rgoldberg Nov 16, 2024
12d0fe9
Suppress output for `class-dump` executable check.
rgoldberg Nov 16, 2024
019c9b9
Rename `OLD_FILENAME` as `generated_bottle_filename`.
rgoldberg Nov 16, 2024
68bdbfe
Only set bash variables once.
rgoldberg Nov 16, 2024
28266c4
Simplify `script/bottle`.
rgoldberg Nov 16, 2024
3414328
Cleanup `.editorconfig`.
rgoldberg Nov 16, 2024
c2f1bf8
Simplify & standardize script output headers & mas version handling.
rgoldberg Nov 16, 2024
009ac1b
Rename `script/version_bump` as `script/generate_version_info_for_swi…
rgoldberg Nov 17, 2024
460718f
Unfinished: Only bump formulae; don't generate them or store them in …
rgoldberg Nov 16, 2024
4831ea4
Fix `Makefile` comment.
rgoldberg Nov 17, 2024
e1bea1f
Remove obsolete `Makefile` target.
rgoldberg Nov 17, 2024
3b10909
Delete `script/bottle`.
rgoldberg Nov 17, 2024
31e946a
Just bump custom tap formula.
rgoldberg Nov 17, 2024
4f4a37e
Cleanup `homebrew-core` release job.
rgoldberg Nov 17, 2024
ce81834
Make `brew bump-formula-pr` usages consistent.
rgoldberg Nov 17, 2024
8c397ae
`release.yml`: improve comments, remove unnecessary environment varia…
rgoldberg Nov 17, 2024
1ec76e9
Remove extraneous spaces surrounding variables in GitHub workflows.
rgoldberg Nov 17, 2024
41f5cb0
Remove unnecessary comments from GitHub workflows.
rgoldberg Nov 17, 2024
41b100f
Replace external grep dependency with bash conditional.
rgoldberg Nov 17, 2024
0e8e848
`script/install`: fix universal executable path.
rgoldberg Nov 18, 2024
5122765
Bash scripts: Change all non-environment variable names to lowercase.
rgoldberg Nov 18, 2024
4b6482e
`release.yml`: replace `needs.start.outputs.mas_version` with `github…
rgoldberg Nov 18, 2024
2960ef6
Do not indent cases in bash scripts.
rgoldberg Nov 18, 2024
77175d2
Improve dry run.
rgoldberg Nov 18, 2024
3f3b84e
Incorporate fixes from 638/release-fixes by @phatblat.
rgoldberg Nov 18, 2024
26b892b
Improve URLs.
rgoldberg Nov 18, 2024
c15c6a2
`release.yml`: Sanitize version tag input by using environment variable.
rgoldberg Nov 18, 2024
659bf2e
`release.yml`: Move `RELEASE_TAG` environment variable to top level.
rgoldberg Nov 18, 2024
686489a
`release.yml`: Improve step names.
rgoldberg Nov 18, 2024
d80b898
`release.yml`: Change `start` job `🔈 Log real release event` step if …
rgoldberg Nov 18, 2024
ec9a95e
`release.yml`: Use environment variables top prevent code injection a…
rgoldberg Nov 19, 2024
a7f89f6
`release.yml`: Use `DRY_RUN` top-level environment variable instead o…
rgoldberg Nov 19, 2024
823d4f0
`release.yml`: Use `!contains(env.RELEASE_TAG, '-')` instead of a `pr…
rgoldberg Nov 19, 2024
e24f524
`release.yml`: Remove unnecessary `👢 Bootstrap` step from `homebrew-c…
rgoldberg Nov 19, 2024
514b93e
`release.yml`: Change `homebrew-tap.needs` from `start` to `pkg-insta…
rgoldberg Nov 19, 2024
902ab83
`release.yml`: Combine all separate jobs into one single job to simpl…
rgoldberg Nov 19, 2024
9968bcd
Replace `echo` with `printf` in bash scripts.
rgoldberg Nov 19, 2024
47c07d1
Delete `script/brew_core_update` & move its `homebrew-core/mas` bump …
rgoldberg Nov 19, 2024
09c1abf
Delete `Makefile` & seemingly unused bash scripts.
rgoldberg Nov 19, 2024
1ef95d0
Delete `script/install`.
rgoldberg Nov 19, 2024
4ae40a9
Ensure bash scripts don't use unset variables.
rgoldberg Nov 19, 2024
b6613bb
Update `actions/checkout@v4` settings:
rgoldberg Nov 19, 2024
58fd1e1
Improve script modularity:
rgoldberg Nov 19, 2024
fed396c
No longer git ignore `Sources/MasKit/Package.swift` since the `MasKit…
rgoldberg Nov 20, 2024
befb458
Cleanup Swift files.
rgoldberg Nov 21, 2024
800633e
The `swift-format` formula will only install on macOS 13+.
rgoldberg Nov 21, 2024
39ce6b9
Upgrade swiftformat to 0.55.2, prettier to 3.4.1, & markdownlint-cli …
rgoldberg Nov 21, 2024
292771a
Output full `git describe --tags` to indicate number of commits since…
rgoldberg Nov 21, 2024
403a3f8
Remove unnecessary single quotes from bash scripts.
rgoldberg Nov 22, 2024
0870111
Remove unnecessary `swiftlint` output filtering from `script/lint`.
rgoldberg Nov 22, 2024
a0f59fc
Use `markdownlint` on all `*.md` files.
rgoldberg Nov 22, 2024
1fe3ca4
Remove incorrect comment from `script/format`.
rgoldberg Nov 22, 2024
c064c91
Rename `linter` as `formatter` in `script/format`.
rgoldberg Nov 22, 2024
9ab9277
Change Swift formatter emoji to fix output spacing issues in `script/…
rgoldberg Nov 22, 2024
16c5a26
Make `swiftformat` `--strict` in `script/format`.
rgoldberg Nov 22, 2024
6913bf6
Make `swiftlint` `--quiet` in `script/format`.
rgoldberg Nov 22, 2024
2061d88
Filter out boilerplate `swiftformat` output from `script/format`.
rgoldberg Nov 22, 2024
1cf85be
Filter out boilerplate `prettier` output from `script/format`.
rgoldberg Nov 22, 2024
50f4333
Filter out boilerplate output from `script/test`.
rgoldberg Nov 22, 2024
2f6873b
brew bundle no longer generates `Brewfile.lock.json`.
rgoldberg Nov 27, 2024
b4452ad
🔥 Remove DRY_RUN var
phatblat Dec 1, 2024
5d9abd3
Remove shfmt because it cannot work with zsh.
rgoldberg Dec 2, 2024
5a29bb7
Switch scripts from bash to zsh.
rgoldberg Dec 2, 2024
f4f5f18
Add & use `script/_setup_script` to configure all zsh scripts.
rgoldberg Dec 2, 2024
0dadaf6
`script/clean`: `rm -f Sources/mas/Package.swift`.
rgoldberg Dec 3, 2024
c950af3
GitHub Workflows: reorder workflow parts, improve step emojis, update…
rgoldberg Dec 2, 2024
b484dcf
Improve `class-dump` installation instructions.
rgoldberg Dec 3, 2024
181bf05
`script/bootstrap`: install Homebrew if not already installed.
rgoldberg Dec 3, 2024
3848da7
Improve `script/build`:
rgoldberg Dec 9, 2024
98eb159
Move printf earlier in scripts.
rgoldberg Dec 10, 2024
6b3ed95
Remove act dependency & `.actrc`.
rgoldberg Dec 10, 2024
a378478
Remove debug output & associated env vars from `.github/workflows/rel…
rgoldberg Dec 10, 2024
f322e00
Simplify zsh scripts.
rgoldberg Dec 10, 2024
6682686
`release.yml`: rename `RELEASE_TAG` as `TAG_NAME`.
rgoldberg Dec 16, 2024
7751dda
`release.yml`: remove `*_TOKEN` env vars to check if they're necessary.
rgoldberg Dec 16, 2024
15053e6
`release.yml`: add & use `PRERELEASE` workflow-level env var.
rgoldberg Dec 16, 2024
aa150fb
`release.yml`: run job iff repo is `mas-cli/mas`.
rgoldberg Dec 16, 2024
00a7c02
`release.yml`: run iff a tag is pushed to the `mas-cli/mas` repo.
rgoldberg Dec 18, 2024
d5f9dba
Make `Package/Distribution.plist` as close to .pkg contents as possible.
rgoldberg Dec 19, 2024
8994505
Improve `script/package`:
rgoldberg Dec 19, 2024
9cab3e4
Replace `Package/Distribution.plist` with a heredoc in `script/package`.
rgoldberg Dec 19, 2024
e4795b3
Improve `README.md`:
rgoldberg Dec 19, 2024
0095832
Rename `release` workflow as `pushed-tag`.
rgoldberg Dec 19, 2024
c43b1ba
Don't call `script/bootstrap` from `tag-pushed.yml` as it isn't neces…
rgoldberg Dec 19, 2024
4fb49d9
Replace `TAG_NAME` with `GITHUB_REF_NAME` in `tag-pushed.yml`.
rgoldberg Dec 19, 2024
42ab8a5
Inline single `PRERELEASE` use in `tag-pushed.yml`.
rgoldberg Dec 19, 2024
4f96d96
Move `DEFAULT_BRANCH_NAME` environment variable from top level to `🚰 …
rgoldberg Dec 19, 2024
96243f2
Replace `$(git rev-parse "${GITHUB_REF_NAME}")` with `${GITHUB_SHA}` …
rgoldberg Dec 19, 2024
f9ec6bb
Add `GH_TOKEN` environment variable to `tag-pushed` job in `tag-pushe…
rgoldberg Dec 20, 2024
61e473e
Add `HOMEBREW_GITHUB_API_TOKEN` environment variable to `🚰 Bump mas-c…
rgoldberg Dec 20, 2024
567a330
Fix tag verification steps in `tag-pushed.yml`.
rgoldberg Dec 20, 2024
bbdf8f1
Use tag name & tag message in release title.
rgoldberg Dec 20, 2024
ac5856e
Spacing in `tag-pushed.yml`.
rgoldberg Dec 20, 2024
b069658
Cleanup `actions/checkout@v4` step in `danger.yml`.
rgoldberg Dec 21, 2024
fa018e7
Include zsh options in GitHub workflows.
rgoldberg Dec 21, 2024
2b92c5d
Improve git fetching in `tag-pushed.yml`.
rgoldberg Dec 21, 2024
a3a00fc
Fix workflows.
rgoldberg Dec 22, 2024
82e2810
Removed unnecessary quoting.
rgoldberg Dec 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .actrc

This file was deleted.

38 changes: 13 additions & 25 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,39 +1,27 @@
# http://editorconfig.org
# https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[script/*]
indent_size = 2

[*.{yml,yaml}]
[*.json]
indent_size = 2

# Use 2 spaces for Ruby files
[{Podfile,Rakefile,script/*,*.{podspec,rb,yml}}]
indent_size = 2
indent_style = space
max_line_length = 80
# Trailing spaces have meaning in Markdown
[*.md]
trim_trailing_whitespace = false

# Use tabs for property lists
[*.plist]
indent_style = tab

# JSON files contain newlines inconsistently
[*.json]
[*.yml]
indent_size = 2
insert_final_newline = ignore

# Makefiles always use tabs for indentation
[Makefile]
indent_style = tab

# Trailing spaces have meaning in Markdown
[*.md]
trim_trailing_whitespace = false
[script/*]
indent_size = 2
max_line_length = 80
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Trailing spaces may be intentional in markdown documents, so these should not
# be removed.
# https://gist.github.com/shaunlebron/746476e6e7a4d698b373
**/*.md whitespace=-blank-at-eol
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
---
version: 2
updates:
Expand Down
12 changes: 0 additions & 12 deletions .github/event.json

This file was deleted.

21 changes: 5 additions & 16 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,32 @@
#
# .github/workflows/build-test.yml
#
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
---
name: Build, Test, and Lint

on:
pull_request:
branches: [main]
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
build-test:
name: Build, Test, and Lint

# https://github.com/actions/runner-images#available-images
runs-on: macos-15

defaults:
run:
# Prefixes all `run` commands with the following command to force them to run outside Rosetta.
# https://github.com/actions/runner/issues/805#issuecomment-942784948
# https://github.com/rolpdog/cffi-mirror/blob/release-1.15/.github/workflows/ci.yaml#L81-L141
# https://github.com/actions/virtual-environments/issues/2187#issuecomment-790507204
shell: arch -arm64 bash --noprofile --norc -eo pipefail {0}

# Force all run commands to not use Rosetta 2
shell: arch -arm64 /bin/zsh -Negku {0}
steps:
- uses: actions/checkout@v4
with:
# A fetch-depth of 0 includes all history and tags for script/version
# Include all history & tags for script/version
fetch-depth: 0

- name: Bootstrap
run: script/bootstrap -f
run: script/bootstrap

- name: Build
run: script/build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#
# .github/workflows/danger.yml
#
# https://docs.github.com/en/actions/reference/environment-variables#default-environment-variables
---
name: danger
on:
Expand All @@ -11,11 +10,12 @@ jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4

- name: Danger
# https://github.com/orgs/danger/packages/container/package/danger-swift
uses: docker://ghcr.io/danger/danger-swift:3.18.0
uses: docker://ghcr.io/danger/danger-swift:3.20.2
with:
args: --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
39 changes: 39 additions & 0 deletions .github/workflows/release-published.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#
# .github/workflows/release-published.yml
#
---
name: release-published
on:
release:
types: [published]
defaults:
run:
# Force all run commands to not use Rosetta 2
shell: arch -arm64 /bin/zsh -Negku {0}
jobs:
release-published:
if: ${{!github.event.repository.fork}}
runs-on: macos-15
steps:
- name: 🚰 Apply pr-pull label to custom tap formula bump PR
env:
GH_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: |
gh release -R "${GITHUB_REPOSITORY}" download "${GITHUB_REF_NAME}" -p bump.url
gh pr edit "$(<bump.url)" --add-label pr-pull
gh release -R "${GITHUB_REPOSITORY}" delete-asset "${GITHUB_REF_NAME}" bump.url -y

- name: 🍺 Bump homebrew-core formula
if: ${{!github.event.release.prerelease}}
env:
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
run: |
brew bump-formula-pr\
--tag "${GITHUB_REF_NAME}"\
--revision "${GITHUB_SHA}"\
--fork-org "${GITHUB_REPOSITORY_OWNER}"\
--no-browse\
--online\
--strict\
--verbose\
mas
Loading
Loading