You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* main:
feat(wait): add human-readable String() methods to all wait strategies (docker#119)
feat(image): display formatted pull progress on Windows terminals (docker#118)
chore(release): add Go proxy refresh automation (docker#117)
chore(release): bump module versions
chore(release): prevent for pushing to personal forks (docker#115)
chore(release): add pre-release checks to make the release process more consistent (docker#114)
chore(volume): return pointer in FindByID (docker#105)
fix(container): proper error message on empty container names (docker#113)
fix(container): add to nil modifiers (docker#112)
feat(container): add new functional options to add container config, hostConfig and endpointSettings (docker#111)
feat(container): configure pull handler at container creation (docker#110)
Copy file name to clipboardExpand all lines: RELEASING.md
+42-8Lines changed: 42 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ Each module's version is defined in the `version.go` file at the root of the mod
14
14
15
15
The primary way to perform releases is through GitHub Actions workflows.
16
16
17
+
**Important**: GitHub Actions release workflows can only be run from the `main` branch. The workflows will automatically be skipped if triggered from any other branch. This is a safety measure to ensure releases are only performed from the primary branch.
18
+
17
19
#### Releasing All Modules
18
20
19
21
1. Go to the [Actions tab](../../actions) in the GitHub repository
@@ -43,6 +45,8 @@ The primary way to perform releases is through GitHub Actions workflows.
43
45
44
46
If you need to perform releases manually or troubleshoot issues:
45
47
48
+
**Note**: Manual releases using `make` commands can technically be run from any branch, but should be run from the `main` branch for consistency with the GitHub Actions workflows.
49
+
46
50
#### Prerequisites
47
51
- Docker installed (for semver-tool)
48
52
- jq installed (`brew install jq` on macOS)
@@ -51,16 +55,21 @@ If you need to perform releases manually or troubleshoot issues:
51
55
52
56
#### Releasing All Modules
53
57
```bash
54
-
# Dry run to preview changes (no git changes made)
55
-
DRY_RUN=true make release-all
58
+
# Step 1: Dry run to preview version changes (no build files created)
59
+
DRY_RUN=true make pre-release-all # Explicit dry run, safe to run
60
+
61
+
# Step 2: Prepare release for real (creates build files in .github/scripts/.build/)
62
+
DRY_RUN=false make pre-release-all
56
63
57
-
# Actual release (creates commits, tags, and pushes)
64
+
#Step 3: Actual release (automatically checks pre-release, creates commits, tags, and pushes)
58
65
DRY_RUN=false make release-all
59
66
60
67
# With specific bump type
61
68
BUMP_TYPE=patch DRY_RUN=false make release-all
62
69
```
63
70
71
+
**Note**: The `release-all` target automatically runs `check-pre-release` for all modules to verify that `pre-release-all` was completed successfully (with `DRY_RUN=false`). If you try to run `release-all` without first running `pre-release-all` with `DRY_RUN=false`, it will fail with an error.
The `pre-release-all` or `pre-release` command must be run first:
111
121
- Finds latest tag for each module
112
122
- Uses semver-tool to calculate next version
113
123
- Handles prerelease numbering with leading zeros
124
+
- Writes the next version to a file in the build directory, located at `.github/scripts/.build/<module>-next-tag`
125
+
126
+
### 2. Release Validation Checks
127
+
Before creating any commits or tags, the release script performs the following validation checks:
128
+
129
+
**Git Remote Validation:**
130
+
- Verifies that the `origin` remote points to `[email protected]:docker/go-sdk.git` (or HTTPS equivalent)
131
+
- Prevents accidentally pushing releases to forks or personal repositories
132
+
- If validation fails, the script aborts immediately with instructions to fix the remote
133
+
134
+
**Pre-Release Verification:**
135
+
- The `release-all` command automatically runs `check-pre-release` for all modules
136
+
- Verifies the `.github/scripts/.build` directory exists
137
+
- Checks each module has a corresponding `<module>-next-tag` file
138
+
- Validates the version in `<module>-next-tag` matches the version in `<module>/version.go`
139
+
- If any checks fail, the release is aborted with an error message
140
+
- Implemented in `.github/scripts/check-pre-release.sh`
141
+
- Ensures `pre-release-all` was completed successfully (with `DRY_RUN=false`)
142
+
143
+
You can manually run the check for a specific module:
144
+
```bash
145
+
make -C client check-pre-release
146
+
# or
147
+
cd client && make check-pre-release
148
+
```
114
149
115
-
### 2. File Updates
150
+
### 3. File Updates
116
151
For each module:
117
-
- Writes the next version to a file in the build directory, located at `.github/scripts/.build/<module>-next-tag`. This is a temporary file that is used to store the next version for the module.
118
152
- Updates `<module>/version.go` with new version
119
153
- Updates all `go.mod` files with new cross-module dependencies
120
154
- Runs `go mod tidy` to update `go.sum` files
121
155
122
-
### 3. Git Operations
156
+
### 4. Git Operations
123
157
When `DRY_RUN=false`:
124
158
- Creates a single commit with all version changes
125
159
- Creates git tags for each module (e.g., `client/v0.1.0-alpha006`)
@@ -131,7 +165,7 @@ When `DRY_RUN=true`:
131
165
- Shows diffs of version files
132
166
- Completely safe to run multiple times
133
167
134
-
### 4. Go Proxy Registration
168
+
### 5. Go Proxy Registration
135
169
When `DRY_RUN=false`:
136
170
- Triggers Go proxy to fetch new module versions
137
171
- Makes modules immediately available for download via `go get`
0 commit comments