Skip to content

Commit 9261b34

Browse files
committed
fix: defaults, missing branch param
1 parent 570c886 commit 9261b34

6 files changed

Lines changed: 23 additions & 12 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## v3.2.1 (2026-01-11)
4+
5+
- Copy defaults from inside Python app to GitHub Action definition resulting in more reproducable runs
6+
- Pass in missing `branch` param from GitHub Actions to Docker image
7+
38
## v3.2.0 (2026-01-11)
49

510
- Adds `custom_tarball` parameter, allowing you to bundle your distributable assets however you'd like (closes #63)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,11 @@ jobs:
108108
commit_email: homebrew-releaser@example.com
109109

110110
# Install command for your formula.
111-
# Required - string
111+
# Required - multiline string
112112
install: 'bin.install "src/my-script.sh" => "my-script"'
113113

114114
# Test command for your formula, used for `brew test`.
115-
# Optional - string
115+
# Optional - multiline string
116116
test: 'assert_match("my script output", shell_output("my-script-command"))'
117117

118118
# Custom dependencies in case other formulas are needed to build the current one.

action.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,15 @@ inputs:
77
homebrew_owner:
88
description: 'The name of the homebrew tap owner to publish your formula to as it appears on GitHub.'
99
required: true
10+
default: ''
1011
homebrew_tap:
1112
description: 'The name of the homebrew tap to publish your formula to as it appears on GitHub.'
1213
required: true
14+
default: ''
1315
formula_folder:
1416
description: 'The name of the folder in your homebrew tap where formula will be committed to.'
1517
required: false
18+
default: Formula
1619
branch:
1720
description: The branch to push your formula file to (if not present, the branch used will be your repo default branch).
1821
required: false
@@ -22,9 +25,11 @@ inputs:
2225
commit_owner:
2326
description: 'Git author info used to commit to the homebrew tap.'
2427
required: false
28+
default: homebrew-releaser
2529
commit_email:
2630
description: 'Git author info used to commit to the homebrew tap.'
2731
required: false
32+
default: homebrew-releaser@example.com
2833
depends_on:
2934
description: 'Custom dependencies in case other formulas are needed to build the current one (can be multiline).'
3035
required: false
@@ -46,6 +51,7 @@ inputs:
4651
update_python_resources:
4752
description: "Run 'brew update-python-resources' on the formula to add Python resources."
4853
required: false
54+
default: 'false'
4955
version:
5056
description: 'Override the automatically detected version of a formula with an explicit value.'
5157
required: false
@@ -67,22 +73,27 @@ inputs:
6773
update_readme_table:
6874
description: "Update your homebrew tap's README with a table of all projects in the tap."
6975
required: false
76+
default: 'false'
7077
skip_commit:
7178
description: 'Skips committing the generated formula to a homebrew tap (useful for local testing).'
7279
required: false
80+
default: 'false'
7381
skip_checksum:
7482
description: 'Skips uploading the checksum file for release assets to the release.'
7583
required: false
84+
default: 'false'
7685
debug:
7786
description: 'Logs debugging info to console.'
7887
required: false
88+
default: 'false'
7989
runs:
8090
using: docker
81-
image: docker://justintime50/homebrew-releaser:3.2.0
91+
image: docker://justintime50/homebrew-releaser:3.2.1
8292
args:
8393
- ${{ inputs.homebrew_owner }}
8494
- ${{ inputs.homebrew_tap }}
8595
- ${{ inputs.formula_folder }}
96+
- ${{ inputs.branch }}
8697
- ${{ inputs.github_token }}
8798
- ${{ inputs.commit_owner }}
8899
- ${{ inputs.commit_email }}

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
- GITHUB_REPOSITORY=justintime50/github-actions-test
1010
- INPUT_HOMEBREW_OWNER=justintime50
1111
- INPUT_HOMEBREW_TAP=homebrew-test
12-
- INPUT_FORMULA_FOLDER=Formula
12+
- INPUT_FORMULA_FOLDER=
1313
- INPUT_BRANCH=
1414
- INPUT_GITHUB_TOKEN=
1515
- INPUT_COMMIT_OWNER=justintime50

homebrew_releaser/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.2.0"
1+
__version__ = "3.2.1"

homebrew_releaser/readme_updater.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import os
22
import re
3-
from typing import (
4-
Any,
5-
Optional,
6-
Tuple,
7-
)
3+
from typing import Any, Optional, Tuple
84

95
import pretty_tables
106
import woodchips
@@ -16,7 +12,6 @@
1612
)
1713
from homebrew_releaser.utils import build_dir_path
1814

19-
2015
TABLE_START_TAG = "<!-- project_table_start -->"
2116
TABLE_END_TAG = "<!-- project_table_end -->"
2217

@@ -44,7 +39,7 @@ def _format_formula_data(homebrew_tap: str) -> list[dict[str, Any]]:
4439
files = os.listdir(build_dir_path(homebrew_tap, FORMULA_FOLDER))
4540

4641
if not any([file.endswith(".rb") for file in files]):
47-
raise SystemExit('No Ruby files found in the "formula_folder" provided.')
42+
raise SystemExit(f"No Ruby files found in {FORMULA_FOLDER}.")
4843

4944
try:
5045
for filename in sorted(files):

0 commit comments

Comments
 (0)