@omnidist/omnidist 0.1.20 → 0.1.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +90 -7
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -81,7 +81,15 @@ This creates:
|
|
|
81
81
|
- `.omnidist/` workspace directories
|
|
82
82
|
- `.omnidist/.gitignore` for generated artifacts
|
|
83
83
|
|
|
84
|
-
3.
|
|
84
|
+
3. Edit config and set environment variables (optional):
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
$EDITOR .omnidist/omnidist.yaml
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
`omnidist` loads `.env` automatically when present, so you can keep values like `OMNIDIST_VERSION`, `NPM_PUBLISH_TOKEN`, and `UV_PUBLISH_TOKEN` there.
|
|
91
|
+
|
|
92
|
+
4. Build binaries for configured targets:
|
|
85
93
|
|
|
86
94
|
```bash
|
|
87
95
|
omnidist build
|
|
@@ -89,7 +97,7 @@ omnidist build
|
|
|
89
97
|
|
|
90
98
|
This also writes the resolved build version to `.omnidist/dist/VERSION`.
|
|
91
99
|
|
|
92
|
-
|
|
100
|
+
5. Stage and verify artifacts:
|
|
93
101
|
|
|
94
102
|
```bash
|
|
95
103
|
omnidist stage
|
|
@@ -100,18 +108,21 @@ omnidist verify
|
|
|
100
108
|
`.omnidist/uv/pyproject.toml` with that version.
|
|
101
109
|
It also recreates `.omnidist/uv/dist` to prevent stale wheel artifacts from previous runs.
|
|
102
110
|
|
|
103
|
-
|
|
111
|
+
6. Publish when verification passes:
|
|
104
112
|
|
|
105
113
|
```bash
|
|
106
114
|
omnidist publish
|
|
107
115
|
```
|
|
108
116
|
|
|
109
|
-
|
|
117
|
+
7. Generate tag-triggered release workflow:
|
|
110
118
|
|
|
111
119
|
```bash
|
|
112
120
|
omnidist ci
|
|
113
121
|
```
|
|
114
122
|
|
|
123
|
+
The generated workflow publishes npm and uv artifacts and also creates a GitHub
|
|
124
|
+
release with the built cross-platform binaries plus `checksums.txt`.
|
|
125
|
+
|
|
115
126
|
## Common Commands
|
|
116
127
|
|
|
117
128
|
```bash
|
|
@@ -152,8 +163,11 @@ omnidist uv publish --publish-url https://test.pypi.org/legacy/ --token <pypi-to
|
|
|
152
163
|
|
|
153
164
|
Supported variables:
|
|
154
165
|
|
|
155
|
-
- `OMNIDIST_VERSION`: used when `version.source: env`; also expanded in `build.ldflags` templates (for example `${OMNIDIST_VERSION}`).
|
|
166
|
+
- `OMNIDIST_VERSION`: used only when `version.source: env`; also expanded in `build.ldflags` templates (for example `${OMNIDIST_VERSION}`).
|
|
156
167
|
`VERSION` is not used.
|
|
168
|
+
- `OMNIDIST_CONFIG`: optional global config file path (same as `--config`).
|
|
169
|
+
- `OMNIDIST_PROFILE`: optional config profile name (same as `--profile`).
|
|
170
|
+
- `OMNIDIST_OMNIDIST_ROOT`: optional project root directory (same as `--omnidist-root`).
|
|
157
171
|
- `OMNIDIST_GIT_COMMIT`: optional ldflags template variable for build metadata; populated automatically by `omnidist build` when git metadata is available.
|
|
158
172
|
- `OMNIDIST_BUILD_DATE`: optional ldflags template variable for build metadata; populated automatically by `omnidist build` as UTC RFC3339.
|
|
159
173
|
- `NPM_PUBLISH_TOKEN`: required for npm publish commands when not using `--dry-run`
|
|
@@ -163,6 +177,7 @@ Example `.env`:
|
|
|
163
177
|
|
|
164
178
|
```dotenv
|
|
165
179
|
OMNIDIST_VERSION=1.2.3
|
|
180
|
+
OMNIDIST_PROFILE=release
|
|
166
181
|
NPM_PUBLISH_TOKEN=npm_xxx
|
|
167
182
|
UV_PUBLISH_TOKEN=pypi-xxx
|
|
168
183
|
```
|
|
@@ -177,7 +192,9 @@ tool:
|
|
|
177
192
|
main: ./cmd/omnidist
|
|
178
193
|
|
|
179
194
|
version:
|
|
180
|
-
source: git-tag # git-tag | file | env
|
|
195
|
+
source: git-tag # git-tag | file | env | fixed
|
|
196
|
+
file: VERSION # optional; used when source is file (default VERSION)
|
|
197
|
+
fixed: 1.2.3 # required when source is fixed
|
|
181
198
|
|
|
182
199
|
targets:
|
|
183
200
|
- os: darwin
|
|
@@ -201,6 +218,7 @@ distributions:
|
|
|
201
218
|
package: "@omnidist/omnidist"
|
|
202
219
|
registry: https://registry.npmjs.org
|
|
203
220
|
access: public # public | restricted
|
|
221
|
+
license: MIT # optional override for package.json license; omit to use SEE LICENSE IN <file>
|
|
204
222
|
include-readme: true # include project README.md in staged packages when present
|
|
205
223
|
|
|
206
224
|
uv:
|
|
@@ -210,6 +228,49 @@ distributions:
|
|
|
210
228
|
include-readme: true # include project README.md in staged wheels when present
|
|
211
229
|
```
|
|
212
230
|
|
|
231
|
+
Profiles mode:
|
|
232
|
+
|
|
233
|
+
```yaml
|
|
234
|
+
profiles:
|
|
235
|
+
default:
|
|
236
|
+
tool:
|
|
237
|
+
name: omnidist
|
|
238
|
+
main: ./cmd/omnidist
|
|
239
|
+
version:
|
|
240
|
+
source: env
|
|
241
|
+
targets:
|
|
242
|
+
- os: linux
|
|
243
|
+
arch: amd64
|
|
244
|
+
build:
|
|
245
|
+
ldflags: -s -w
|
|
246
|
+
tags: []
|
|
247
|
+
cgo: false
|
|
248
|
+
distributions:
|
|
249
|
+
npm:
|
|
250
|
+
package: "@scope/mytool"
|
|
251
|
+
uv:
|
|
252
|
+
package: mytool
|
|
253
|
+
|
|
254
|
+
release:
|
|
255
|
+
tool:
|
|
256
|
+
name: omnidist
|
|
257
|
+
main: ./cmd/omnidist
|
|
258
|
+
version:
|
|
259
|
+
source: fixed
|
|
260
|
+
fixed: 1.0.0
|
|
261
|
+
targets:
|
|
262
|
+
- os: linux
|
|
263
|
+
arch: amd64
|
|
264
|
+
build:
|
|
265
|
+
ldflags: -s -w
|
|
266
|
+
tags: []
|
|
267
|
+
cgo: false
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Select a profile with `--profile <name>` or `OMNIDIST_PROFILE`.
|
|
271
|
+
If `profiles` is present and no profile is provided, `default` is used.
|
|
272
|
+
Mixing top-level runtime fields and `profiles` in the same file is not supported.
|
|
273
|
+
|
|
213
274
|
`targets` use Go values (`GOOS`/`GOARCH`). Distribution workflows map them as needed (for example `windows/amd64` -> npm `win32/x64`).
|
|
214
275
|
|
|
215
276
|
For appkit version injection, configure `build.ldflags` in your project config:
|
|
@@ -221,6 +282,21 @@ build:
|
|
|
221
282
|
|
|
222
283
|
With `version.source: git-tag`, release workflows require `HEAD` to be on an exact SemVer tag (`vX.Y.Z` or `X.Y.Z`).
|
|
223
284
|
|
|
285
|
+
With `version.source: file`, omnidist reads `./VERSION` from the repository root.
|
|
286
|
+
|
|
287
|
+
With `version.source: file`, you can override the path via `version.file` (for example `versions/release.txt`).
|
|
288
|
+
|
|
289
|
+
With `version.source: fixed`, set `version.fixed` to an exact value in config (for example `1.2.3`).
|
|
290
|
+
|
|
291
|
+
With `version.source: env`, set `OMNIDIST_VERSION` (for example in `.env`) before build/stage/publish.
|
|
292
|
+
|
|
293
|
+
Use global `--omnidist-root <path>` to set the project root for a command. Omnidist resolves it to an absolute path at startup and changes working directory to it before loading `.env` and config.
|
|
294
|
+
|
|
295
|
+
Workspace behavior:
|
|
296
|
+
- Legacy config writes artifacts to `.omnidist/*`.
|
|
297
|
+
- Profiles config writes artifacts to `.omnidist/<profile>/*`.
|
|
298
|
+
- Isolation is by profile name. If different config files use the same profile name in the same repo, they share the same `.omnidist/<profile>` workspace.
|
|
299
|
+
|
|
224
300
|
## Command Reference
|
|
225
301
|
|
|
226
302
|
Top-level:
|
|
@@ -236,6 +312,12 @@ Top-level:
|
|
|
236
312
|
- `omnidist npm`
|
|
237
313
|
- `omnidist uv`
|
|
238
314
|
|
|
315
|
+
Global flags:
|
|
316
|
+
|
|
317
|
+
- `--config <path>`
|
|
318
|
+
- `--profile <name>`
|
|
319
|
+
- `--omnidist-root <path>`
|
|
320
|
+
|
|
239
321
|
NPM subcommands:
|
|
240
322
|
|
|
241
323
|
- `omnidist npm stage [--dev]`
|
|
@@ -290,7 +372,8 @@ omnidist ci
|
|
|
290
372
|
```
|
|
291
373
|
|
|
292
374
|
The generated workflow triggers on `v*` tag pushes and runs:
|
|
293
|
-
`build -> stage -> verify -> publish
|
|
375
|
+
`build -> stage -> verify -> publish`, then publishes the built binaries and
|
|
376
|
+
checksums to the GitHub release.
|
|
294
377
|
|
|
295
378
|
If workflow already exists:
|
|
296
379
|
|
package/package.json
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"license": "SEE LICENSE IN LICENSE",
|
|
15
15
|
"name": "@omnidist/omnidist",
|
|
16
16
|
"optionalDependencies": {
|
|
17
|
-
"@omnidist/omnidist-darwin-arm64": "0.1.
|
|
18
|
-
"@omnidist/omnidist-darwin-x64": "0.1.
|
|
19
|
-
"@omnidist/omnidist-linux-arm64": "0.1.
|
|
20
|
-
"@omnidist/omnidist-linux-x64": "0.1.
|
|
21
|
-
"@omnidist/omnidist-win32-x64": "0.1.
|
|
17
|
+
"@omnidist/omnidist-darwin-arm64": "0.1.22",
|
|
18
|
+
"@omnidist/omnidist-darwin-x64": "0.1.22",
|
|
19
|
+
"@omnidist/omnidist-linux-arm64": "0.1.22",
|
|
20
|
+
"@omnidist/omnidist-linux-x64": "0.1.22",
|
|
21
|
+
"@omnidist/omnidist-win32-x64": "0.1.22"
|
|
22
22
|
},
|
|
23
|
-
"version": "0.1.
|
|
23
|
+
"version": "0.1.22"
|
|
24
24
|
}
|