@omnidist/omnidist 0.1.21 → 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.
Files changed (2) hide show
  1. package/README.md +58 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -165,6 +165,9 @@ Supported variables:
165
165
 
166
166
  - `OMNIDIST_VERSION`: used only when `version.source: env`; also expanded in `build.ldflags` templates (for example `${OMNIDIST_VERSION}`).
167
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`).
168
171
  - `OMNIDIST_GIT_COMMIT`: optional ldflags template variable for build metadata; populated automatically by `omnidist build` when git metadata is available.
169
172
  - `OMNIDIST_BUILD_DATE`: optional ldflags template variable for build metadata; populated automatically by `omnidist build` as UTC RFC3339.
170
173
  - `NPM_PUBLISH_TOKEN`: required for npm publish commands when not using `--dry-run`
@@ -174,6 +177,7 @@ Example `.env`:
174
177
 
175
178
  ```dotenv
176
179
  OMNIDIST_VERSION=1.2.3
180
+ OMNIDIST_PROFILE=release
177
181
  NPM_PUBLISH_TOKEN=npm_xxx
178
182
  UV_PUBLISH_TOKEN=pypi-xxx
179
183
  ```
@@ -224,6 +228,49 @@ distributions:
224
228
  include-readme: true # include project README.md in staged wheels when present
225
229
  ```
226
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
+
227
274
  `targets` use Go values (`GOOS`/`GOARCH`). Distribution workflows map them as needed (for example `windows/amd64` -> npm `win32/x64`).
228
275
 
229
276
  For appkit version injection, configure `build.ldflags` in your project config:
@@ -245,6 +292,11 @@ With `version.source: env`, set `OMNIDIST_VERSION` (for example in `.env`) befor
245
292
 
246
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.
247
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
+
248
300
  ## Command Reference
249
301
 
250
302
  Top-level:
@@ -260,6 +312,12 @@ Top-level:
260
312
  - `omnidist npm`
261
313
  - `omnidist uv`
262
314
 
315
+ Global flags:
316
+
317
+ - `--config <path>`
318
+ - `--profile <name>`
319
+ - `--omnidist-root <path>`
320
+
263
321
  NPM subcommands:
264
322
 
265
323
  - `omnidist npm stage [--dev]`
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.21",
18
- "@omnidist/omnidist-darwin-x64": "0.1.21",
19
- "@omnidist/omnidist-linux-arm64": "0.1.21",
20
- "@omnidist/omnidist-linux-x64": "0.1.21",
21
- "@omnidist/omnidist-win32-x64": "0.1.21"
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.21"
23
+ "version": "0.1.22"
24
24
  }