@simplysf/simply-cicd 0.13.0 → 0.14.0
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 +47 -46
- package/lib/common/build/createFallbackTag.js +4 -3
- package/lib/common/build/createFallbackTag.js.map +1 -1
- package/lib/common/build/versionTagFormat.d.ts +6 -3
- package/lib/common/build/versionTagFormat.js +22 -15
- package/lib/common/build/versionTagFormat.js.map +1 -1
- package/messages/simply.cicd.build.create-fallback-tag.md +1 -1
- package/messages/simply.cicd.build.create-package-version.md +1 -1
- package/messages/simply.cicd.build.determine-package-changes.md +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ EXAMPLES
|
|
|
83
83
|
$ sf simply cicd build cleanup-scratch-orgs --dev-hub my-devhub
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
_See code: [lib/commands/simply/cicd/build/cleanup-scratch-orgs.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
86
|
+
_See code: [lib/commands/simply/cicd/build/cleanup-scratch-orgs.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/cleanup-scratch-orgs.js)_
|
|
87
87
|
|
|
88
88
|
## `sf simply cicd build create-fallback-tag`
|
|
89
89
|
|
|
@@ -124,10 +124,10 @@ DESCRIPTION
|
|
|
124
124
|
Resolves the last tag to increment (either `--last-tag`, or the closest reachable tag matching the project's version
|
|
125
125
|
prefix), extracts its annotated `04t` package version ID, and creates/pushes a new tag with an incremented numeric
|
|
126
126
|
suffix (e.g. `v1.2.3.4` -> `v1.2.3.4-1` -> `v1.2.3.4-2`) annotated with that same package ID. Tags are matched and
|
|
127
|
-
parsed in the project's `plugins.simply.versionTagFormat`, so only a counter after
|
|
128
|
-
incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never
|
|
129
|
-
(does not error) when no last tag, or no valid package ID within it, can be found — a build
|
|
130
|
-
to just has nothing to do here.
|
|
127
|
+
parsed in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, so only a counter after
|
|
128
|
+
the formatted version is incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never
|
|
129
|
+
`v1.2.3-5`. Soft no-ops (does not error) when no last tag, or no valid package ID within it, can be found — a build
|
|
130
|
+
with nothing to fall back to just has nothing to do here.
|
|
131
131
|
|
|
132
132
|
Also soft no-ops when HEAD already carries a tag matching the version prefix, e.g. because `build
|
|
133
133
|
create-package-version` just created and tagged a real package version earlier in the same job. This also keeps a
|
|
@@ -140,7 +140,7 @@ EXAMPLES
|
|
|
140
140
|
$ sf simply cicd build create-fallback-tag --ci-commit-ref-name main --ci-project-path group/project --project-access-token glpat-... --ci-pipeline-id 123
|
|
141
141
|
```
|
|
142
142
|
|
|
143
|
-
_See code: [lib/commands/simply/cicd/build/create-fallback-tag.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
143
|
+
_See code: [lib/commands/simply/cicd/build/create-fallback-tag.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-fallback-tag.js)_
|
|
144
144
|
|
|
145
145
|
## `sf simply cicd build create-package-version`
|
|
146
146
|
|
|
@@ -201,10 +201,11 @@ DESCRIPTION
|
|
|
201
201
|
declared in `sfdx-project.json`), and creates/pushes a git tag annotated with the new package version's `04t` ID.
|
|
202
202
|
|
|
203
203
|
The tag is `v<major>.<minor>.<patch>.<build>` by default. A project can choose its own shape with a
|
|
204
|
-
`plugins.simply.versionTagFormat` template in `sfdx-project.json
|
|
205
|
-
`1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`,
|
|
206
|
-
|
|
207
|
-
directory's `branch` attribute or the CI ref is
|
|
204
|
+
`plugins.simply.versionTagFormat` template in `sfdx-project.json`, or the `SIMPLY_CICD_VERSION_TAG_FORMAT` environment
|
|
205
|
+
variable (which overrides it) — e.g. `{MAJOR}.{MINOR}.{PATCH}+{BUILD}` tags `1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`,
|
|
206
|
+
`{MINOR}`, `{PATCH}`, and `{BUILD}` must appear exactly once, and the format is validated before any package version
|
|
207
|
+
is created. Unless this is a release-branch build, the package directory's `branch` attribute or the CI ref is
|
|
208
|
+
appended as `-<suffix>` after the formatted version.
|
|
208
209
|
|
|
209
210
|
Skipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).
|
|
210
211
|
|
|
@@ -212,7 +213,7 @@ EXAMPLES
|
|
|
212
213
|
$ sf simply cicd build create-package-version --ci-commit-ref-name main --ci-commit-sha a1b2c3d --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/pipelines/123 --ci-project-path group/project --project-access-token glpat-... --packaging-devhub my-packaging-devhub
|
|
213
214
|
```
|
|
214
215
|
|
|
215
|
-
_See code: [lib/commands/simply/cicd/build/create-package-version.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
216
|
+
_See code: [lib/commands/simply/cicd/build/create-package-version.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-package-version.js)_
|
|
216
217
|
|
|
217
218
|
## `sf simply cicd build create-scratch`
|
|
218
219
|
|
|
@@ -253,7 +254,7 @@ EXAMPLES
|
|
|
253
254
|
$ sf simply cicd build create-scratch --dev-hub my-devhub
|
|
254
255
|
```
|
|
255
256
|
|
|
256
|
-
_See code: [lib/commands/simply/cicd/build/create-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
257
|
+
_See code: [lib/commands/simply/cicd/build/create-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/create-scratch.js)_
|
|
257
258
|
|
|
258
259
|
## `sf simply cicd build delete-scratch`
|
|
259
260
|
|
|
@@ -292,7 +293,7 @@ EXAMPLES
|
|
|
292
293
|
$ sf simply cicd build delete-scratch --dev-hub my-devhub
|
|
293
294
|
```
|
|
294
295
|
|
|
295
|
-
_See code: [lib/commands/simply/cicd/build/delete-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
296
|
+
_See code: [lib/commands/simply/cicd/build/delete-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/delete-scratch.js)_
|
|
296
297
|
|
|
297
298
|
## `sf simply cicd build determine-package-changes`
|
|
298
299
|
|
|
@@ -315,17 +316,17 @@ DESCRIPTION
|
|
|
315
316
|
Determine if any package-relevant files have changed since the last release tag.
|
|
316
317
|
|
|
317
318
|
Reads the default package directory from `sfdx-project.json`, finds the closest reachable git tag for its
|
|
318
|
-
`major.minor.patch` (in the project's `plugins.simply.versionTagFormat`,
|
|
319
|
-
diffs that tag against `HEAD` for the package directory and
|
|
320
|
-
`PACKAGE_CHANGED=TRUE|FALSE` and `LAST_TAG=<tag>` to the output file. Any failure
|
|
321
|
-
sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`, so a build never
|
|
322
|
-
done.
|
|
319
|
+
`major.minor.patch` (in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`,
|
|
320
|
+
`v<major>.<minor>.<patch>.*` by default), and diffs that tag against `HEAD` for the package directory and
|
|
321
|
+
`sfdx-project.json` itself. Writes `PACKAGE_CHANGED=TRUE|FALSE` and `LAST_TAG=<tag>` to the output file. Any failure
|
|
322
|
+
during detection (missing/invalid sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`, so a build never
|
|
323
|
+
silently skips work it should have done.
|
|
323
324
|
|
|
324
325
|
EXAMPLES
|
|
325
326
|
$ sf simply cicd build determine-package-changes --out changes.env
|
|
326
327
|
```
|
|
327
328
|
|
|
328
|
-
_See code: [lib/commands/simply/cicd/build/determine-package-changes.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
329
|
+
_See code: [lib/commands/simply/cicd/build/determine-package-changes.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/determine-package-changes.js)_
|
|
329
330
|
|
|
330
331
|
## `sf simply cicd build generate-flexipage-diff`
|
|
331
332
|
|
|
@@ -383,7 +384,7 @@ EXAMPLES
|
|
|
383
384
|
$ sf simply cicd build generate-flexipage-diff --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-...
|
|
384
385
|
```
|
|
385
386
|
|
|
386
|
-
_See code: [lib/commands/simply/cicd/build/generate-flexipage-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
387
|
+
_See code: [lib/commands/simply/cicd/build/generate-flexipage-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/generate-flexipage-diff.js)_
|
|
387
388
|
|
|
388
389
|
## `sf simply cicd build generate-flow-diff`
|
|
389
390
|
|
|
@@ -441,7 +442,7 @@ EXAMPLES
|
|
|
441
442
|
$ sf simply cicd build generate-flow-diff --vcs-provider github --ci-repository my-org/my-repo --ci-pull-request-number 45 --ci-run-id 987 --from abc123 --to def456 --project-access-token ghp-...
|
|
442
443
|
```
|
|
443
444
|
|
|
444
|
-
_See code: [lib/commands/simply/cicd/build/generate-flow-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
445
|
+
_See code: [lib/commands/simply/cicd/build/generate-flow-diff.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/generate-flow-diff.js)_
|
|
445
446
|
|
|
446
447
|
## `sf simply cicd build install-dependencies`
|
|
447
448
|
|
|
@@ -478,7 +479,7 @@ EXAMPLES
|
|
|
478
479
|
$ sf simply cicd build install-dependencies --jwt-key-file ./server.key
|
|
479
480
|
```
|
|
480
481
|
|
|
481
|
-
_See code: [lib/commands/simply/cicd/build/install-dependencies.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
482
|
+
_See code: [lib/commands/simply/cicd/build/install-dependencies.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/install-dependencies.js)_
|
|
482
483
|
|
|
483
484
|
## `sf simply cicd build lwc-jest`
|
|
484
485
|
|
|
@@ -506,7 +507,7 @@ EXAMPLES
|
|
|
506
507
|
$ sf simply cicd build lwc-jest
|
|
507
508
|
```
|
|
508
509
|
|
|
509
|
-
_See code: [lib/commands/simply/cicd/build/lwc-jest.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
510
|
+
_See code: [lib/commands/simply/cicd/build/lwc-jest.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/lwc-jest.js)_
|
|
510
511
|
|
|
511
512
|
## `sf simply cicd build publish-utam-page-objects`
|
|
512
513
|
|
|
@@ -609,7 +610,7 @@ EXAMPLES
|
|
|
609
610
|
--subscriber-package-version-id 04tXXXXXXXXXXXXXXX --dry-run
|
|
610
611
|
```
|
|
611
612
|
|
|
612
|
-
_See code: [lib/commands/simply/cicd/build/publish-utam-page-objects.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
613
|
+
_See code: [lib/commands/simply/cicd/build/publish-utam-page-objects.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/publish-utam-page-objects.js)_
|
|
613
614
|
|
|
614
615
|
## `sf simply cicd build push-scratch`
|
|
615
616
|
|
|
@@ -650,7 +651,7 @@ EXAMPLES
|
|
|
650
651
|
$ sf simply cicd build push-scratch --jwt-key-file ./server.key
|
|
651
652
|
```
|
|
652
653
|
|
|
653
|
-
_See code: [lib/commands/simply/cicd/build/push-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
654
|
+
_See code: [lib/commands/simply/cicd/build/push-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/push-scratch.js)_
|
|
654
655
|
|
|
655
656
|
## `sf simply cicd build test-scratch`
|
|
656
657
|
|
|
@@ -686,7 +687,7 @@ EXAMPLES
|
|
|
686
687
|
$ sf simply cicd build test-scratch --jwt-key-file ./server.key
|
|
687
688
|
```
|
|
688
689
|
|
|
689
|
-
_See code: [lib/commands/simply/cicd/build/test-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
690
|
+
_See code: [lib/commands/simply/cicd/build/test-scratch.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/build/test-scratch.js)_
|
|
690
691
|
|
|
691
692
|
## `sf simply cicd deploy happy-soup deploy-unpackaged`
|
|
692
693
|
|
|
@@ -737,7 +738,7 @@ EXAMPLES
|
|
|
737
738
|
$ sf simply cicd deploy happy-soup deploy-unpackaged --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
|
|
738
739
|
```
|
|
739
740
|
|
|
740
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
741
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/deploy-unpackaged.js)_
|
|
741
742
|
|
|
742
743
|
## `sf simply cicd deploy happy-soup deployment-close-out`
|
|
743
744
|
|
|
@@ -791,7 +792,7 @@ EXAMPLES
|
|
|
791
792
|
$ sf simply cicd deploy happy-soup deployment-close-out --ci-commit-ref-name main --ci-pipeline-id 123 --ci-project-path group/project --project-access-token $PROJECT_ACCESS_TOKEN --deploy-release-date 2026-01-15
|
|
792
793
|
```
|
|
793
794
|
|
|
794
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
795
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/deployment-close-out.js)_
|
|
795
796
|
|
|
796
797
|
## `sf simply cicd deploy happy-soup install-packaged`
|
|
797
798
|
|
|
@@ -837,7 +838,7 @@ EXAMPLES
|
|
|
837
838
|
$ sf simply cicd deploy happy-soup install-packaged --alias my-org
|
|
838
839
|
```
|
|
839
840
|
|
|
840
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
841
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/install-packaged.js)_
|
|
841
842
|
|
|
842
843
|
## `sf simply cicd deploy happy-soup post-deploy`
|
|
843
844
|
|
|
@@ -888,7 +889,7 @@ EXAMPLES
|
|
|
888
889
|
$ sf simply cicd deploy happy-soup post-deploy --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
|
|
889
890
|
```
|
|
890
891
|
|
|
891
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
892
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/post-deploy.js)_
|
|
892
893
|
|
|
893
894
|
## `sf simply cicd deploy happy-soup post-destructive`
|
|
894
895
|
|
|
@@ -939,7 +940,7 @@ EXAMPLES
|
|
|
939
940
|
$ sf simply cicd deploy happy-soup post-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
|
|
940
941
|
```
|
|
941
942
|
|
|
942
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
943
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/post-destructive.js)_
|
|
943
944
|
|
|
944
945
|
## `sf simply cicd deploy happy-soup pre-destructive`
|
|
945
946
|
|
|
@@ -990,7 +991,7 @@ EXAMPLES
|
|
|
990
991
|
$ sf simply cicd deploy happy-soup pre-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org --source-branch-name release/uat
|
|
991
992
|
```
|
|
992
993
|
|
|
993
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
994
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/pre-destructive.js)_
|
|
994
995
|
|
|
995
996
|
## `sf simply cicd deploy happy-soup tag-deployment`
|
|
996
997
|
|
|
@@ -1042,7 +1043,7 @@ EXAMPLES
|
|
|
1042
1043
|
$ sf simply cicd deploy happy-soup tag-deployment --alias my-org --ci-pipeline-id 123 --ci-pipeline-url https://gitlab.example.com/group/project/-/pipelines/123 --ci-project-path group/project --ci-merge-request-iid 45 --ci-merge-request-project-url https://gitlab.example.com/group/project --project-access-token $PROJECT_ACCESS_TOKEN
|
|
1043
1044
|
```
|
|
1044
1045
|
|
|
1045
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1046
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/tag-deployment.js)_
|
|
1046
1047
|
|
|
1047
1048
|
## `sf simply cicd deploy happy-soup validate`
|
|
1048
1049
|
|
|
@@ -1080,7 +1081,7 @@ EXAMPLES
|
|
|
1080
1081
|
$ sf simply cicd deploy happy-soup validate --deploy-config-file deployment-configs/uat.json --deploy-rules-file config/deploy-rules.json
|
|
1081
1082
|
```
|
|
1082
1083
|
|
|
1083
|
-
_See code: [lib/commands/simply/cicd/deploy/happy-soup/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1084
|
+
_See code: [lib/commands/simply/cicd/deploy/happy-soup/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/happy-soup/validate.js)_
|
|
1084
1085
|
|
|
1085
1086
|
## `sf simply cicd deploy project deploy-unpackaged`
|
|
1086
1087
|
|
|
@@ -1128,7 +1129,7 @@ EXAMPLES
|
|
|
1128
1129
|
$ sf simply cicd deploy project deploy-unpackaged --ci-job-token $CI_JOB_TOKEN --alias my-org
|
|
1129
1130
|
```
|
|
1130
1131
|
|
|
1131
|
-
_See code: [lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1132
|
+
_See code: [lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/deploy-unpackaged.js)_
|
|
1132
1133
|
|
|
1133
1134
|
## `sf simply cicd deploy project install-packaged`
|
|
1134
1135
|
|
|
@@ -1176,7 +1177,7 @@ EXAMPLES
|
|
|
1176
1177
|
$ sf simply cicd deploy project install-packaged --ci-job-token $CI_JOB_TOKEN --alias my-org
|
|
1177
1178
|
```
|
|
1178
1179
|
|
|
1179
|
-
_See code: [lib/commands/simply/cicd/deploy/project/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1180
|
+
_See code: [lib/commands/simply/cicd/deploy/project/install-packaged.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/install-packaged.js)_
|
|
1180
1181
|
|
|
1181
1182
|
## `sf simply cicd deploy project post-deploy`
|
|
1182
1183
|
|
|
@@ -1224,7 +1225,7 @@ EXAMPLES
|
|
|
1224
1225
|
$ sf simply cicd deploy project post-deploy --ci-job-token $CI_JOB_TOKEN --alias my-org
|
|
1225
1226
|
```
|
|
1226
1227
|
|
|
1227
|
-
_See code: [lib/commands/simply/cicd/deploy/project/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1228
|
+
_See code: [lib/commands/simply/cicd/deploy/project/post-deploy.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/post-deploy.js)_
|
|
1228
1229
|
|
|
1229
1230
|
## `sf simply cicd deploy project post-destructive`
|
|
1230
1231
|
|
|
@@ -1272,7 +1273,7 @@ EXAMPLES
|
|
|
1272
1273
|
$ sf simply cicd deploy project post-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org
|
|
1273
1274
|
```
|
|
1274
1275
|
|
|
1275
|
-
_See code: [lib/commands/simply/cicd/deploy/project/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1276
|
+
_See code: [lib/commands/simply/cicd/deploy/project/post-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/post-destructive.js)_
|
|
1276
1277
|
|
|
1277
1278
|
## `sf simply cicd deploy project pre-destructive`
|
|
1278
1279
|
|
|
@@ -1320,7 +1321,7 @@ EXAMPLES
|
|
|
1320
1321
|
$ sf simply cicd deploy project pre-destructive --ci-job-token $CI_JOB_TOKEN --alias my-org
|
|
1321
1322
|
```
|
|
1322
1323
|
|
|
1323
|
-
_See code: [lib/commands/simply/cicd/deploy/project/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1324
|
+
_See code: [lib/commands/simply/cicd/deploy/project/pre-destructive.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/pre-destructive.js)_
|
|
1324
1325
|
|
|
1325
1326
|
## `sf simply cicd deploy project run-apex-tests`
|
|
1326
1327
|
|
|
@@ -1367,7 +1368,7 @@ EXAMPLES
|
|
|
1367
1368
|
$ sf simply cicd deploy project run-apex-tests --ci-job-token $CI_JOB_TOKEN --alias my-org
|
|
1368
1369
|
```
|
|
1369
1370
|
|
|
1370
|
-
_See code: [lib/commands/simply/cicd/deploy/project/run-apex-tests.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1371
|
+
_See code: [lib/commands/simply/cicd/deploy/project/run-apex-tests.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/run-apex-tests.js)_
|
|
1371
1372
|
|
|
1372
1373
|
## `sf simply cicd deploy project validate`
|
|
1373
1374
|
|
|
@@ -1402,7 +1403,7 @@ EXAMPLES
|
|
|
1402
1403
|
$ sf simply cicd deploy project validate --deploy-config-file config/deploy.json --deploy-rules-file config/deploy-rules.json
|
|
1403
1404
|
```
|
|
1404
1405
|
|
|
1405
|
-
_See code: [lib/commands/simply/cicd/deploy/project/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1406
|
+
_See code: [lib/commands/simply/cicd/deploy/project/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/project/validate.js)_
|
|
1406
1407
|
|
|
1407
1408
|
## `sf simply cicd deploy validate`
|
|
1408
1409
|
|
|
@@ -1436,7 +1437,7 @@ EXAMPLES
|
|
|
1436
1437
|
$ sf simply cicd deploy validate --deploy-config-file config/deploy.json --deploy-rules-file config/deploy-rules.json
|
|
1437
1438
|
```
|
|
1438
1439
|
|
|
1439
|
-
_See code: [lib/commands/simply/cicd/deploy/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1440
|
+
_See code: [lib/commands/simply/cicd/deploy/validate.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/deploy/validate.js)_
|
|
1440
1441
|
|
|
1441
1442
|
## `sf simply cicd notify happy-soup`
|
|
1442
1443
|
|
|
@@ -1509,7 +1510,7 @@ EXAMPLES
|
|
|
1509
1510
|
$ sf simply cicd notify happy-soup --after-script --is-final-job --notify-on-completion --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled
|
|
1510
1511
|
```
|
|
1511
1512
|
|
|
1512
|
-
_See code: [lib/commands/simply/cicd/notify/happy-soup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1513
|
+
_See code: [lib/commands/simply/cicd/notify/happy-soup.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/notify/happy-soup.js)_
|
|
1513
1514
|
|
|
1514
1515
|
## `sf simply cicd notify project`
|
|
1515
1516
|
|
|
@@ -1583,7 +1584,7 @@ EXAMPLES
|
|
|
1583
1584
|
$ sf simply cicd notify project --after-script --ci-job-stage post-destructive --ci-job-status success --teams-webhook-url https://outlook.office.com/webhook/... --enabled
|
|
1584
1585
|
```
|
|
1585
1586
|
|
|
1586
|
-
_See code: [lib/commands/simply/cicd/notify/project.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1587
|
+
_See code: [lib/commands/simply/cicd/notify/project.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/notify/project.js)_
|
|
1587
1588
|
|
|
1588
1589
|
## `sf simply cicd notify teams`
|
|
1589
1590
|
|
|
@@ -1615,7 +1616,7 @@ EXAMPLES
|
|
|
1615
1616
|
$ sf simply cicd notify teams --payload '{"text":"Deployment complete"}' --webhook-url https://outlook.office.com/webhook/... --enabled
|
|
1616
1617
|
```
|
|
1617
1618
|
|
|
1618
|
-
_See code: [lib/commands/simply/cicd/notify/teams.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1619
|
+
_See code: [lib/commands/simply/cicd/notify/teams.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/notify/teams.js)_
|
|
1619
1620
|
|
|
1620
1621
|
## `sf simply cicd sfdx-dependabot`
|
|
1621
1622
|
|
|
@@ -1691,7 +1692,7 @@ FLAG DESCRIPTIONS
|
|
|
1691
1692
|
Defaults to the selected provider's public instance if not provided.
|
|
1692
1693
|
```
|
|
1693
1694
|
|
|
1694
|
-
_See code: [lib/commands/simply/cicd/sfdx-dependabot.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.
|
|
1695
|
+
_See code: [lib/commands/simply/cicd/sfdx-dependabot.js](https://github.com/SimplySF/simply-plugins/blob/@simplysf/simply-cicd@0.13.0/packages/simply-cicd/lib/commands/simply/cicd/sfdx-dependabot.js)_
|
|
1695
1696
|
<!-- commandsstop -->
|
|
1696
1697
|
|
|
1697
1698
|
## License
|
|
@@ -19,10 +19,11 @@ import { getDefaultPackageDirectory, isSubscriberPackageVersionId, readSfdxProje
|
|
|
19
19
|
import { createVcsProvider } from '@simplysf/simply-cicd-core';
|
|
20
20
|
import { addGitRemote } from '../git.js';
|
|
21
21
|
import { logger } from '../logger.js';
|
|
22
|
-
import {
|
|
22
|
+
import { VersionTagFormat } from './versionTagFormat.js';
|
|
23
23
|
/**
|
|
24
24
|
* The project's version tag format and the glob for its current `major.minor.patch`. An unreadable
|
|
25
|
-
* `sfdx-project.json` falls back to the default format; an
|
|
25
|
+
* `sfdx-project.json` falls back to `SIMPLY_CICD_VERSION_TAG_FORMAT` or the default format; an
|
|
26
|
+
* invalid format still throws.
|
|
26
27
|
*/
|
|
27
28
|
async function resolveTagContext() {
|
|
28
29
|
let project;
|
|
@@ -30,7 +31,7 @@ async function resolveTagContext() {
|
|
|
30
31
|
project = await readSfdxProject();
|
|
31
32
|
}
|
|
32
33
|
catch {
|
|
33
|
-
const versionTagFormat = VersionTagFormat.
|
|
34
|
+
const versionTagFormat = VersionTagFormat.fromProject(undefined);
|
|
34
35
|
const tagMatchPattern = versionTagFormat.matchPattern();
|
|
35
36
|
logger.info(`Could not read version prefix from sfdx-project.json. Defaulting to match pattern ${tagMatchPattern}`);
|
|
36
37
|
return { versionTagFormat, tagMatchPattern };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createFallbackTag.js","sourceRoot":"","sources":["../../../src/common/build/createFallbackTag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAwB,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"createFallbackTag.js","sourceRoot":"","sources":["../../../src/common/build/createFallbackTag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,eAAe,GAEhB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAwB,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAIzD;;;;GAIG;AACH,KAAK,UAAU,iBAAiB;IAC9B,IAAI,OAAgC,CAAC;IACrC,IAAI,CAAC;QACH,OAAO,GAAG,MAAM,eAAe,EAAE,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QACjE,MAAM,eAAe,GAAG,gBA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,cAAc,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAC1D,MAAM,CAAC,IAAI,CAAC,iCAAiC,OAAO,EAAE,CAAC,CAAC;IAExD,MAAM,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,WAAW,EAAE;QACzD,IAAI,EAAE,OAAO,CAAC,OAAO;QACrB,KAAK,EAAE,OAAO,CAAC,kBAAkB;KAClC,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,MAAM,YAAY,CACpC,OAAO,CAAC,YAAY,EACpB,OAAO,CAAC,kBAAkB,EAC1B,OAAO,CAAC,aAAa,EACrB,WAAW,CACZ,CAAC;IAEF,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,EAAE,CAAC,CAAC;IACnD,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IAC5D,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;IACnD,MAAM,CAAC,OAAO,CAAC,wCAAwC,OAAO,EAAE,CAAC,CAAC;IAElE,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,iCAAiC,SAAS,IAAI,EAAE,OAAO,CAAC,CAAC;IACrF,MAAM,CAAC,OAAO,CAAC,+BAA+B,OAAO,EAAE,CAAC,CAAC;IAEzD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACpD,CAAC"}
|
|
@@ -3,13 +3,15 @@ import { type SfdxProject } from '@simplysf/simply-core';
|
|
|
3
3
|
export declare const DEFAULT_VERSION_TAG_FORMAT = "v{MAJOR}.{MINOR}.{PATCH}.{BUILD}";
|
|
4
4
|
/** Where in `sfdx-project.json` a project declares its own format. */
|
|
5
5
|
export declare const VERSION_TAG_FORMAT_CONFIG_PATH = "plugins.simply.versionTagFormat";
|
|
6
|
+
/** Overrides the project's format, in every command that reads it, when set to a non-empty value. */
|
|
7
|
+
export declare const VERSION_TAG_FORMAT_ENV_VAR = "SIMPLY_CICD_VERSION_TAG_FORMAT";
|
|
6
8
|
declare const PLACEHOLDERS: readonly ["MAJOR", "MINOR", "PATCH", "BUILD"];
|
|
7
9
|
type Placeholder = (typeof PLACEHOLDERS)[number];
|
|
8
10
|
/** A Salesforce package version's four numeric parts. */
|
|
9
11
|
export type VersionParts = Record<Lowercase<Placeholder>, string>;
|
|
10
12
|
/** Thrown for a format that can't be used, so callers that otherwise swallow errors can let it through. */
|
|
11
13
|
export declare class VersionTagFormatError extends Error {
|
|
12
|
-
constructor(format: string, problem: string);
|
|
14
|
+
constructor(format: string, problem: string, source?: string);
|
|
13
15
|
}
|
|
14
16
|
/** A tag split back into the version the format rendered and whatever was appended after it. */
|
|
15
17
|
export type ParsedVersionTag = {
|
|
@@ -31,9 +33,10 @@ export declare class VersionTagFormat {
|
|
|
31
33
|
/** @throws {VersionTagFormatError} If the format can't produce distinct, parseable, legal tags. */
|
|
32
34
|
static parse(format: string): VersionTagFormat;
|
|
33
35
|
/**
|
|
34
|
-
* The format
|
|
36
|
+
* The format in `SIMPLY_CICD_VERSION_TAG_FORMAT` when it's set, otherwise the one declared under
|
|
37
|
+
* `plugins.simply.versionTagFormat`, otherwise the default.
|
|
35
38
|
*
|
|
36
|
-
* @throws {VersionTagFormatError} If the
|
|
39
|
+
* @throws {VersionTagFormatError} If the chosen format is invalid.
|
|
37
40
|
*/
|
|
38
41
|
static fromProject(project: SfdxProject | undefined): VersionTagFormat;
|
|
39
42
|
/**
|
|
@@ -18,13 +18,15 @@ import { getPluginConfig } from '@simplysf/simply-core';
|
|
|
18
18
|
export const DEFAULT_VERSION_TAG_FORMAT = 'v{MAJOR}.{MINOR}.{PATCH}.{BUILD}';
|
|
19
19
|
/** Where in `sfdx-project.json` a project declares its own format. */
|
|
20
20
|
export const VERSION_TAG_FORMAT_CONFIG_PATH = 'plugins.simply.versionTagFormat';
|
|
21
|
+
/** Overrides the project's format, in every command that reads it, when set to a non-empty value. */
|
|
22
|
+
export const VERSION_TAG_FORMAT_ENV_VAR = 'SIMPLY_CICD_VERSION_TAG_FORMAT';
|
|
21
23
|
const PLACEHOLDERS = ['MAJOR', 'MINOR', 'PATCH', 'BUILD'];
|
|
22
24
|
/** `sf package version report` returns `Version` as `major.minor.patch.build`. */
|
|
23
25
|
const SALESFORCE_VERSION_PATTERN = /^(?<major>\d+)\.(?<minor>\d+)\.(?<patch>\d+)\.(?<build>\d+)$/;
|
|
24
26
|
/** Thrown for a format that can't be used, so callers that otherwise swallow errors can let it through. */
|
|
25
27
|
export class VersionTagFormatError extends Error {
|
|
26
|
-
constructor(format, problem) {
|
|
27
|
-
super(`Invalid version tag format "${format}" (${
|
|
28
|
+
constructor(format, problem, source = VERSION_TAG_FORMAT_CONFIG_PATH) {
|
|
29
|
+
super(`Invalid version tag format "${format}" (${source}): ${problem}`);
|
|
28
30
|
this.name = 'VersionTagFormatError';
|
|
29
31
|
}
|
|
30
32
|
}
|
|
@@ -53,14 +55,14 @@ function findRefNameProblem(tag) {
|
|
|
53
55
|
}
|
|
54
56
|
return undefined;
|
|
55
57
|
}
|
|
56
|
-
function tokenize(format) {
|
|
58
|
+
function tokenize(format, source) {
|
|
57
59
|
const segments = [];
|
|
58
60
|
const placeholderPattern = /\{(?<name>[^{}]*)\}/g;
|
|
59
61
|
let lastIndex = 0;
|
|
60
62
|
for (const match of format.matchAll(placeholderPattern)) {
|
|
61
63
|
const name = match.groups?.name ?? '';
|
|
62
64
|
if (!PLACEHOLDERS.includes(name)) {
|
|
63
|
-
throw new VersionTagFormatError(format, `unknown placeholder "{${name}}"; use {MAJOR}, {MINOR}, {PATCH}, and {BUILD}
|
|
65
|
+
throw new VersionTagFormatError(format, `unknown placeholder "{${name}}"; use {MAJOR}, {MINOR}, {PATCH}, and {BUILD}`, source);
|
|
64
66
|
}
|
|
65
67
|
if (match.index > lastIndex) {
|
|
66
68
|
segments.push({ kind: 'literal', text: format.slice(lastIndex, match.index) });
|
|
@@ -73,32 +75,32 @@ function tokenize(format) {
|
|
|
73
75
|
}
|
|
74
76
|
return segments;
|
|
75
77
|
}
|
|
76
|
-
function validate(format, segments) {
|
|
78
|
+
function validate(format, segments, source) {
|
|
77
79
|
if (segments.some((segment) => segment.kind === 'literal' && /[{}]/.test(segment.text))) {
|
|
78
|
-
throw new VersionTagFormatError(format, 'contains an unmatched "{" or "}"');
|
|
80
|
+
throw new VersionTagFormatError(format, 'contains an unmatched "{" or "}"', source);
|
|
79
81
|
}
|
|
80
82
|
for (const name of PLACEHOLDERS) {
|
|
81
83
|
const count = segments.filter((segment) => segment.kind === 'placeholder' && segment.name === name).length;
|
|
82
84
|
if (count !== 1) {
|
|
83
|
-
throw new VersionTagFormatError(format, `{${name}} must appear exactly once, found ${count}
|
|
85
|
+
throw new VersionTagFormatError(format, `{${name}} must appear exactly once, found ${count}`, source);
|
|
84
86
|
}
|
|
85
87
|
}
|
|
86
88
|
segments.forEach((segment, index) => {
|
|
87
89
|
const next = segments[index + 1];
|
|
88
90
|
if (segment.kind === 'placeholder' && next?.kind === 'placeholder') {
|
|
89
|
-
throw new VersionTagFormatError(format, `{${segment.name}}{${next.name}} must be separated by a non-digit
|
|
91
|
+
throw new VersionTagFormatError(format, `{${segment.name}}{${next.name}} must be separated by a non-digit`, source);
|
|
90
92
|
}
|
|
91
93
|
const following = segments[index + 2];
|
|
92
94
|
if (segment.kind === 'placeholder' &&
|
|
93
95
|
next?.kind === 'literal' &&
|
|
94
96
|
following?.kind === 'placeholder' &&
|
|
95
97
|
/^\d+$/.test(next.text)) {
|
|
96
|
-
throw new VersionTagFormatError(format, `{${segment.name}} and {${following.name}} must be separated by a non-digit
|
|
98
|
+
throw new VersionTagFormatError(format, `{${segment.name}} and {${following.name}} must be separated by a non-digit`, source);
|
|
97
99
|
}
|
|
98
100
|
});
|
|
99
101
|
const problem = findRefNameProblem(renderSegments(segments, { major: '1', minor: '2', patch: '3', build: '4' }));
|
|
100
102
|
if (problem) {
|
|
101
|
-
throw new VersionTagFormatError(format, `the tags it produces aren't valid git tag names: ${problem}
|
|
103
|
+
throw new VersionTagFormatError(format, `the tags it produces aren't valid git tag names: ${problem}`, source);
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
106
|
function renderSegments(segments, values, missing = '') {
|
|
@@ -117,10 +119,10 @@ export class VersionTagFormat {
|
|
|
117
119
|
format;
|
|
118
120
|
segments;
|
|
119
121
|
tagPattern;
|
|
120
|
-
constructor(format) {
|
|
122
|
+
constructor(format, source) {
|
|
121
123
|
this.format = format;
|
|
122
|
-
this.segments = tokenize(format);
|
|
123
|
-
validate(format, this.segments);
|
|
124
|
+
this.segments = tokenize(format, source);
|
|
125
|
+
validate(format, this.segments, source);
|
|
124
126
|
const versionPattern = this.segments
|
|
125
127
|
.map((segment) => segment.kind === 'literal' ? escapeRegExp(segment.text) : `(?<${segment.name.toLowerCase()}>\\d+)`)
|
|
126
128
|
.join('');
|
|
@@ -131,11 +133,16 @@ export class VersionTagFormat {
|
|
|
131
133
|
return new VersionTagFormat(format);
|
|
132
134
|
}
|
|
133
135
|
/**
|
|
134
|
-
* The format
|
|
136
|
+
* The format in `SIMPLY_CICD_VERSION_TAG_FORMAT` when it's set, otherwise the one declared under
|
|
137
|
+
* `plugins.simply.versionTagFormat`, otherwise the default.
|
|
135
138
|
*
|
|
136
|
-
* @throws {VersionTagFormatError} If the
|
|
139
|
+
* @throws {VersionTagFormatError} If the chosen format is invalid.
|
|
137
140
|
*/
|
|
138
141
|
static fromProject(project) {
|
|
142
|
+
const override = process.env[VERSION_TAG_FORMAT_ENV_VAR];
|
|
143
|
+
if (override) {
|
|
144
|
+
return new VersionTagFormat(override, VERSION_TAG_FORMAT_ENV_VAR);
|
|
145
|
+
}
|
|
139
146
|
const declared = project ? getPluginConfig(project, VERSION_TAG_FORMAT_CONFIG_PATH) : undefined;
|
|
140
147
|
if (declared === undefined || declared === null || declared === '') {
|
|
141
148
|
return new VersionTagFormat(DEFAULT_VERSION_TAG_FORMAT);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionTagFormat.js","sourceRoot":"","sources":["../../../src/common/build/versionTagFormat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAoB,MAAM,uBAAuB,CAAC;AAE1E,+FAA+F;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E,sEAAsE;AACtE,MAAM,CAAC,MAAM,8BAA8B,GAAG,iCAAiC,CAAC;AAEhF,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAMnE,kFAAkF;AAClF,MAAM,0BAA0B,GAAG,8DAA8D,CAAC;AAIlG,2GAA2G;AAC3G,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,YAAmB,MAAc,EAAE,OAAe;
|
|
1
|
+
{"version":3,"file":"versionTagFormat.js","sourceRoot":"","sources":["../../../src/common/build/versionTagFormat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAoB,MAAM,uBAAuB,CAAC;AAE1E,+FAA+F;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG,kCAAkC,CAAC;AAE7E,sEAAsE;AACtE,MAAM,CAAC,MAAM,8BAA8B,GAAG,iCAAiC,CAAC;AAEhF,qGAAqG;AACrG,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAE3E,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAU,CAAC;AAMnE,kFAAkF;AAClF,MAAM,0BAA0B,GAAG,8DAA8D,CAAC;AAIlG,2GAA2G;AAC3G,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IAC9C,YAAmB,MAAc,EAAE,OAA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OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;YAC/F,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE;SACxB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -4,7 +4,7 @@ Create a fallback git tag carrying forward the previous package version's ID, fo
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Resolves the last tag to increment (either `--last-tag`, or the closest reachable tag matching the project's version prefix), extracts its annotated `04t` package version ID, and creates/pushes a new tag with an incremented numeric suffix (e.g. `v1.2.3.4` -> `v1.2.3.4-1` -> `v1.2.3.4-2`) annotated with that same package ID. Tags are matched and parsed in the project's `plugins.simply.versionTagFormat`, so only a counter after the formatted version is incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never `v1.2.3-5`. Soft no-ops (does not error) when no last tag, or no valid package ID within it, can be found — a build with nothing to fall back to just has nothing to do here.
|
|
7
|
+
Resolves the last tag to increment (either `--last-tag`, or the closest reachable tag matching the project's version prefix), extracts its annotated `04t` package version ID, and creates/pushes a new tag with an incremented numeric suffix (e.g. `v1.2.3.4` -> `v1.2.3.4-1` -> `v1.2.3.4-2`) annotated with that same package ID. Tags are matched and parsed in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, so only a counter after the formatted version is incremented — with `v{MAJOR}.{MINOR}.{PATCH}-{BUILD}`, `v1.2.3-4` becomes `v1.2.3-4-1`, never `v1.2.3-5`. Soft no-ops (does not error) when no last tag, or no valid package ID within it, can be found — a build with nothing to fall back to just has nothing to do here.
|
|
8
8
|
|
|
9
9
|
Also soft no-ops when HEAD already carries a tag matching the version prefix, e.g. because `build create-package-version` just created and tagged a real package version earlier in the same job. This also keeps a retried job from adding a second fallback tag to the same commit.
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ Create a new package version, verify minimum code coverage, and create/push a ve
|
|
|
6
6
|
|
|
7
7
|
Skips entirely (without error) when the pipeline was triggered by a merge request, or when this isn't a release-branch build and `--always-create-package` wasn't passed. Otherwise, creates a new version of the default package directory's package, polls until creation finishes, verifies the resulting version's Apex code coverage meets `--code-coverage-minimum` (or the project's own `plugins.simply.coverageRequirement.minimumCoverageRequired`, if declared in `sfdx-project.json`), and creates/pushes a git tag annotated with the new package version's `04t` ID.
|
|
8
8
|
|
|
9
|
-
The tag is `v<major>.<minor>.<patch>.<build>` by default. A project can choose its own shape with a `plugins.simply.versionTagFormat` template in `sfdx-project.json` — e.g. `{MAJOR}.{MINOR}.{PATCH}+{BUILD}` tags `1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`, `{MINOR}`, `{PATCH}`, and `{BUILD}` must appear exactly once, and the format is validated before any package version is created. Unless this is a release-branch build, the package directory's `branch` attribute or the CI ref is appended as `-<suffix>` after the formatted version.
|
|
9
|
+
The tag is `v<major>.<minor>.<patch>.<build>` by default. A project can choose its own shape with a `plugins.simply.versionTagFormat` template in `sfdx-project.json`, or the `SIMPLY_CICD_VERSION_TAG_FORMAT` environment variable (which overrides it) — e.g. `{MAJOR}.{MINOR}.{PATCH}+{BUILD}` tags `1.2.3.4` as `1.2.3+4`. Each of `{MAJOR}`, `{MINOR}`, `{PATCH}`, and `{BUILD}` must appear exactly once, and the format is validated before any package version is created. Unless this is a release-branch build, the package directory's `branch` attribute or the CI ref is appended as `-<suffix>` after the formatted version.
|
|
10
10
|
|
|
11
11
|
Skipped automatically when `PACKAGE_CHANGED=FALSE` is set in the environment (see `build determine-package-changes`).
|
|
12
12
|
|
|
@@ -4,7 +4,7 @@ Determine if any package-relevant files have changed since the last release tag.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
Reads the default package directory from `sfdx-project.json`, finds the closest reachable git tag for its `major.minor.patch` (in the project's `plugins.simply.versionTagFormat`, `v<major>.<minor>.<patch>.*` by default), and diffs that tag against `HEAD` for the package directory and `sfdx-project.json` itself. Writes `PACKAGE_CHANGED=TRUE|FALSE` and `LAST_TAG=<tag>` to the output file. Any failure during detection (missing/invalid sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`, so a build never silently skips work it should have done.
|
|
7
|
+
Reads the default package directory from `sfdx-project.json`, finds the closest reachable git tag for its `major.minor.patch` (in `SIMPLY_CICD_VERSION_TAG_FORMAT` or the project's `plugins.simply.versionTagFormat`, `v<major>.<minor>.<patch>.*` by default), and diffs that tag against `HEAD` for the package directory and `sfdx-project.json` itself. Writes `PACKAGE_CHANGED=TRUE|FALSE` and `LAST_TAG=<tag>` to the output file. Any failure during detection (missing/invalid sfdx-project.json, git errors) defaults to `PACKAGE_CHANGED=TRUE`, so a build never silently skips work it should have done.
|
|
8
8
|
|
|
9
9
|
# flags.out.summary
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simplysf/simply-cicd",
|
|
3
3
|
"description": "Commands for Salesforce CI/CD pipelines",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.14.0",
|
|
5
5
|
"author": "@ClayChipps",
|
|
6
6
|
"homepage": "https://github.com/SimplySF/simply-plugins",
|
|
7
7
|
"bugs": "https://github.com/SimplySF/simply-plugins/issues",
|
|
@@ -203,5 +203,5 @@
|
|
|
203
203
|
"output": []
|
|
204
204
|
}
|
|
205
205
|
},
|
|
206
|
-
"gitHead": "
|
|
206
|
+
"gitHead": "e97be761884ef0e59fac289b520afe41b90d8dd3"
|
|
207
207
|
}
|