@sous-io/sous 0.2.0 → 0.2.2
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/docs/markdown/README.md +4 -0
- package/docs/markdown/_sidebar.md +4 -1
- package/docs/markdown/commands.md +293 -274
- package/docs/markdown/configuration.md +7 -0
- package/docs/markdown/repositories-authoring.md +210 -301
- package/docs/markdown/repositories-consuming.md +219 -468
- package/docs/markdown/repositories-file-formats.md +216 -980
- package/docs/markdown/repositories-providers.md +322 -0
- package/docs/markdown/repositories-quickstart.md +340 -0
- package/docs/markdown/repositories-troubleshooting.md +336 -0
- package/docs/markdown/repositories-variables.md +229 -296
- package/docs/markdown/repositories.md +262 -228
- package/package.json +1 -1
- package/recipes/core/sous-skills/sous.recipe.yaml +1 -1
- package/src/commands/repo/release.ts +14 -8
- package/src/lib/repos/scaffold/templates.ts +9 -7
|
@@ -77,7 +77,8 @@ const RELEASE_REMOTE = "origin";
|
|
|
77
77
|
*
|
|
78
78
|
* Two presets sit on top of it. `--check` is read-only and is what a pull
|
|
79
79
|
* request runs; `--ci` is the non-interactive form a merge runs, which bumps
|
|
80
|
-
* nothing because the version was raised in the change being merged
|
|
80
|
+
* nothing because the version was raised in the change being merged, and which
|
|
81
|
+
* accepts the plan it prints because there is nobody there to accept it.
|
|
81
82
|
*/
|
|
82
83
|
export default class RepoRelease extends Command {
|
|
83
84
|
static description =
|
|
@@ -106,7 +107,8 @@ export default class RepoRelease extends Command {
|
|
|
106
107
|
}),
|
|
107
108
|
ci: Flags.boolean({
|
|
108
109
|
description:
|
|
109
|
-
"Run the way a merge does: never bump, never ask, and fail on
|
|
110
|
+
"Run the way a merge does: never bump, accept the plan, never ask, and fail on " +
|
|
111
|
+
"anything unbumped",
|
|
110
112
|
default: false,
|
|
111
113
|
}),
|
|
112
114
|
namespace: Flags.string({
|
|
@@ -156,10 +158,14 @@ export default class RepoRelease extends Command {
|
|
|
156
158
|
const { flags } = await this.parse(RepoRelease);
|
|
157
159
|
const dryRun = flags["dry-run"];
|
|
158
160
|
const ci = flags.ci;
|
|
159
|
-
// The CI preset is exactly
|
|
160
|
-
//
|
|
161
|
-
//
|
|
161
|
+
// The CI preset is exactly three settings: never raise a version, accept
|
|
162
|
+
// the plan it prints, and never ask. Accepting the plan is part of the
|
|
163
|
+
// preset because there is nobody to ask: a run that only refused to ask
|
|
164
|
+
// would fail on the very confirmation the preset exists to answer. It
|
|
165
|
+
// deliberately does NOT imply --push; the workflow passes that itself, so
|
|
166
|
+
// what gets pushed is visible in the workflow file.
|
|
162
167
|
const noBump = flags["no-bump"] || ci;
|
|
168
|
+
const accepted = flags.yes || ci;
|
|
163
169
|
const interactive = ci ? false : isInteractive();
|
|
164
170
|
|
|
165
171
|
assertFlagsAgree({ ...flags, noBump });
|
|
@@ -222,7 +228,7 @@ export default class RepoRelease extends Command {
|
|
|
222
228
|
|
|
223
229
|
// --- Confirm ----------------------------------------------------------
|
|
224
230
|
|
|
225
|
-
if (!
|
|
231
|
+
if (!accepted) {
|
|
226
232
|
if (!interactive) {
|
|
227
233
|
throw nonInteractiveError({
|
|
228
234
|
prompt: "whether to publish the versions listed above",
|
|
@@ -232,8 +238,8 @@ export default class RepoRelease extends Command {
|
|
|
232
238
|
});
|
|
233
239
|
}
|
|
234
240
|
blankLine();
|
|
235
|
-
const
|
|
236
|
-
if (!
|
|
241
|
+
const answer = await askYesNo("Publish these versions?");
|
|
242
|
+
if (!answer) {
|
|
237
243
|
blankLine();
|
|
238
244
|
log(" Nothing was written.");
|
|
239
245
|
footer();
|
|
@@ -332,12 +332,14 @@ export function buildReleaseWorkflow(): string {
|
|
|
332
332
|
# declare. It only reads; it never writes, commits or tags. That makes it the
|
|
333
333
|
# right thing to run on a pull request.
|
|
334
334
|
#
|
|
335
|
-
# 'sous repo release --ci --push' does the same validation and then
|
|
336
|
-
# '--ci' raises no versions
|
|
337
|
-
# the change being merged, so a
|
|
338
|
-
#
|
|
339
|
-
# for every version that does not
|
|
340
|
-
# pushes the commit and those
|
|
335
|
+
# 'sous repo release --ci --push --yes' does the same validation and then
|
|
336
|
+
# publishes. '--ci' raises no versions, accepts the plan it prints, and asks
|
|
337
|
+
# no questions: the version bump belongs in the change being merged, so a
|
|
338
|
+
# recipe that changed without one fails here rather than being given a version
|
|
339
|
+
# nobody reviewed. It cuts an annotated tag for every version that does not
|
|
340
|
+
# have one yet, dependency-first, and '--push' pushes the commit and those
|
|
341
|
+
# tags. '--ci' implies '--yes'; passing it as well keeps this workflow working
|
|
342
|
+
# with a sous old enough that it did not.
|
|
341
343
|
|
|
342
344
|
name: sous release
|
|
343
345
|
|
|
@@ -385,7 +387,7 @@ jobs:
|
|
|
385
387
|
git config user.name "github-actions[bot]"
|
|
386
388
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
387
389
|
- name: Publish every new version
|
|
388
|
-
run: npx --yes @sous-io/sous repo release --ci --push
|
|
390
|
+
run: npx --yes @sous-io/sous repo release --ci --push --yes
|
|
389
391
|
`;
|
|
390
392
|
}
|
|
391
393
|
|