Skip to content

Commit cd6991d

Browse files
committed
fix(repo): Root command
1 parent 88e0a83 commit cd6991d

File tree

8 files changed

+31
-31
lines changed

8 files changed

+31
-31
lines changed

.github/actions/setup-go/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
go-version:
77
description: "Go version to install"
88
required: false
9-
default: "1.25.1"
9+
default: "1.25.2"
1010
install-tools:
1111
description: "Install common development tools"
1212
required: false

.github/versions.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
versions:
66
# Language versions
7-
go: "1.25.1"
7+
go: "1.25.2"
88
node: "20.x"
99

1010
# Package manager versions
@@ -41,5 +41,5 @@ versions:
4141

4242
# Usage examples:
4343
# In workflows: ${{ vars.GO_VERSION }} or read from this file
44-
# In Dockerfiles: ARG GO_VERSION=1.25.1
45-
# In Makefiles: GO_VERSION ?= 1.25.1
44+
# In Dockerfiles: ARG GO_VERSION=1.25.2
45+
# In Makefiles: GO_VERSION ?= 1.25.2

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515

1616
env:
1717
CGO_ENABLED: 1
18-
GO_VERSION: "1.25.1"
18+
GO_VERSION: "1.25.2"
1919

2020
permissions:
2121
contents: read

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ concurrency:
3131
cancel-in-progress: true
3232

3333
env:
34-
GO_VERSION: "1.25.1"
34+
GO_VERSION: "1.25.2"
3535
INITIAL_VERSION: "v0.0.10"
3636
NODE_VERSION: "22"
3737
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Example configuration file:
2525
```yaml
2626
# .pr-release.yaml
2727

28-
github_token: "ghp_your_token" # Optional; falls back to environment variables
28+
github_token: "ghp_your_token" # Optional; falls back to environment variables
2929
# github_owner and github_repo automatically default to the detected repository
3030
# tools_dir defaults to "tools"
3131
# npm_token is required only when publishing packages
@@ -36,24 +36,24 @@ tools_dir: "tools"
3636
3737
### Environment Variables
3838
39-
| Variable | Description | Required |
40-
| --- | --- | --- |
41-
| `GITHUB_TOKEN`, `PR_RELEASE_GITHUB_TOKEN`, `COMPOZY_RELEASE_GITHUB_TOKEN`, `RELEASE_TOKEN` | GitHub token used for API calls | Only for GitHub operations |
42-
| `GITHUB_REPOSITORY` | `<owner>/<repo>` slug. Highest priority for repository detection | No |
43-
| `GITHUB_OWNER`, `GITHUB_REPOSITORY_OWNER`, `PR_RELEASE_GITHUB_OWNER`, `COMPOZY_RELEASE_GITHUB_OWNER` | Explicit owner override | No |
44-
| `GITHUB_REPOSITORY_NAME`, `PR_RELEASE_GITHUB_REPO`, `COMPOZY_RELEASE_GITHUB_REPO` | Explicit repository name override | No |
45-
| `TOOLS_DIR`, `PR_RELEASE_TOOLS_DIR`, `COMPOZY_RELEASE_TOOLS_DIR` | Directory containing NPM workspaces | No (defaults to `tools`) |
46-
| `NPM_TOKEN`, `PR_RELEASE_NPM_TOKEN`, `COMPOZY_RELEASE_NPM_TOKEN` | Token for publishing to NPM | Required for publishing |
39+
| Variable | Description | Required |
40+
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | -------------------------- |
41+
| `GITHUB_TOKEN`, `PR_RELEASE_GITHUB_TOKEN`, `COMPOZY_RELEASE_GITHUB_TOKEN`, `RELEASE_TOKEN` | GitHub token used for API calls | Only for GitHub operations |
42+
| `GITHUB_REPOSITORY` | `<owner>/<repo>` slug. Highest priority for repository detection | No |
43+
| `GITHUB_OWNER`, `GITHUB_REPOSITORY_OWNER`, `PR_RELEASE_GITHUB_OWNER`, `COMPOZY_RELEASE_GITHUB_OWNER` | Explicit owner override | No |
44+
| `GITHUB_REPOSITORY_NAME`, `PR_RELEASE_GITHUB_REPO`, `COMPOZY_RELEASE_GITHUB_REPO` | Explicit repository name override | No |
45+
| `TOOLS_DIR`, `PR_RELEASE_TOOLS_DIR`, `COMPOZY_RELEASE_TOOLS_DIR` | Directory containing NPM workspaces | No (defaults to `tools`) |
46+
| `NPM_TOKEN`, `PR_RELEASE_NPM_TOKEN`, `COMPOZY_RELEASE_NPM_TOKEN` | Token for publishing to NPM | Required for publishing |
4747

4848
## Commands
4949

5050
The CLI is built with Cobra and exposes the following commands:
5151

52-
| Command | Description |
53-
| --- | --- |
54-
| `pr-release` | Run the full release orchestration workflow |
55-
| `dry-run` | Execute release steps without pushing or opening PRs |
56-
| `version` | Print build metadata |
52+
| Command | Description |
53+
| ------------ | ---------------------------------------------------- |
54+
| `pr-release` | Run the full release orchestration workflow |
55+
| `dry-run` | Execute release steps without pushing or opening PRs |
56+
| `version` | Print build metadata |
5757

5858
Run `go run . <command> --help` for detailed flags.
5959

@@ -71,7 +71,7 @@ ARCH=$(uname -m)
7171
case "$ARCH" in
7272
x86_64) ARCH="x86_64" ;;
7373
amd64) ARCH="x86_64" ;;
74-
arm64|aarch64) ARCH="arm64" ;;
74+
arm64 | aarch64) ARCH="arm64" ;;
7575
*) echo "Unsupported architecture: $ARCH" && exit 1 ;;
7676
esac
7777
@@ -114,7 +114,7 @@ jobs:
114114
- uses: actions/checkout@v4
115115
- uses: actions/setup-go@v5
116116
with:
117-
go-version: "1.25.1"
117+
go-version: "1.25.2"
118118
- name: Run pr-release dry run
119119
run: go run . pr-release --dry-run --ci-output
120120
```
@@ -132,11 +132,11 @@ jobs:
132132

133133
The release workflow relies on additional secrets when running in CI:
134134

135-
| Secret | Purpose |
136-
| --- | --- |
135+
| Secret | Purpose |
136+
| ---------------- | -------------------------- |
137137
| `GORELEASER_KEY` | GoReleaser Pro license key |
138-
| `AUR_KEY` | AUR publishing |
139-
| `NPM_TOKEN` | Publish packages to npm |
138+
| `AUR_KEY` | AUR publishing |
139+
| `NPM_TOKEN` | Publish packages to npm |
140140

141141
## GitHub Actions
142142

cmd/container.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,7 @@ func InitCommands() error {
6969
if err != nil {
7070
return err
7171
}
72-
ctx := rootCmd.Context()
73-
if ctx == nil {
74-
return fmt.Errorf("root command context not initialized")
75-
}
72+
ctx := context.Background()
7673
ctx = config.IntoContext(ctx, c.cfg)
7774
appLogger, err := logger.New(c.cfg.LoggerConfig())
7875
if err != nil {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/compozy/releasepr
22

3-
go 1.25.1
3+
go 1.25.2
44

55
require (
66
github.com/Masterminds/semver/v3 v3.4.0

internal/logger/logger.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,8 @@ func Sync(log *zap.Logger) error {
112112
if errors.Is(err, syscall.EINVAL) {
113113
return nil
114114
}
115+
if errors.Is(err, syscall.EBADF) {
116+
return nil
117+
}
115118
return err
116119
}

0 commit comments

Comments
 (0)