@d-zero/release-automation 0.0.4 → 0.0.5

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.
@@ -249,7 +249,9 @@ async function publishIncomplete(git, line, mode) {
249
249
  */
250
250
  async function pushRelease(input) {
251
251
  const { git } = input;
252
- git.raw('checkout', '--force', '--detach', `origin/${input.line.branch}`);
252
+ // On a local branch named like the line, not detached: `lerna version`
253
+ // refuses a detached HEAD, and its `allowBranch` names the line's branch.
254
+ git.raw('checkout', '--force', '-B', input.line.branch, `origin/${input.line.branch}`);
253
255
  runShell('yarn install --immutable', git.cwd);
254
256
  const generated = generateRelease({
255
257
  git,
@@ -261,7 +263,7 @@ async function pushRelease(input) {
261
263
  now: input.now,
262
264
  });
263
265
  if (!generated.ok) {
264
- git.raw('checkout', '--force', '--detach', `origin/${input.line.branch}`);
266
+ git.raw('checkout', '--force', '-B', input.line.branch, `origin/${input.line.branch}`);
265
267
  return generated;
266
268
  }
267
269
  const appSlug = requireEnv('RELEASE_APP_SLUG');
@@ -83,7 +83,9 @@ export async function verifyReleasePrCommand(options) {
83
83
  throw new Error(`Never published, so no trusted publisher can be set: ${never.join(', ')}. Publish a placeholder by hand and set its trusted publisher first`);
84
84
  }
85
85
  }
86
- git.raw('checkout', '--force', '--detach', parent);
86
+ // On a local branch named like the line, not detached: `lerna version`
87
+ // refuses a detached HEAD, and its `allowBranch` names the line's branch.
88
+ git.raw('checkout', '--force', '-B', line.branch, parent);
87
89
  runShell('yarn install --immutable', git.cwd);
88
90
  const generated = generateRelease({
89
91
  git,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d-zero/release-automation",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Release lines, Release PRs, nightly gates and publishing for D-ZERO repositories",
5
5
  "author": "D-ZERO",
6
6
  "license": "MIT",