@autorelease/auto-single-package
Advanced tools
Comparing version 0.0.18-canary.14.105.0 to 0.0.18-canary.15.110.0
@@ -31,5 +31,12 @@ /* eslint-disable import/no-extraneous-dependencies */ | ||
auto.hooks.next.tapPromise(this.name, async (_, bump, { commits }) => { | ||
const headLabels = commits[0] ? commits[0].labels : []; | ||
auto.logger.log.info( | ||
`Labels found on the last commit: ${headLabels.join(", ")}` | ||
); | ||
console.log(bump === SEMVER.patch, headLabels.includes(CHERRY_PICK_LABEL)) | ||
if (bump === SEMVER.patch && headLabels.includes(CHERRY_PICK_LABEL)) { | ||
@@ -39,12 +46,19 @@ const branch = await getCurrentBranch(); | ||
auto.logger.log.info("Resetting all uncommitted changes to repo..."); | ||
// We don't care about the version that just published so get rid of it | ||
await execPromise("git", ["reset", "--hard", "HEAD"]); | ||
// Switch to master | ||
auto.logger.log.info("Switching to master..."); | ||
await execPromise("git", ["checkout", auto.baseBranch]); | ||
// Cherry pick the commit | ||
auto.logger.log.info("Cherry picking the commit..."); | ||
await execPromise("git", ["cherry-pick", commitToCherryPick]); | ||
// Push the new commit | ||
auto.logger.log.info("Pushing the new commit..."); | ||
await execPromise("git", ["push", auto.remote, auto.baseBranch]); | ||
// Switch back to starting branch | ||
auto.logger.log.info(`Switching back to "${branch}"...`); | ||
await execPromise("git", ["checkout", branch]); | ||
auto.logger.log.success('Updated master with bug-fix!'); | ||
} else { | ||
auto.logger.log.info( | ||
`Did not detect patch with ${CHERRY_PICK_LABEL}, no updates to master pushed.` | ||
); | ||
} | ||
@@ -51,0 +65,0 @@ }); |
{ | ||
"name": "@autorelease/auto-single-package", | ||
"version": "0.0.18-canary.14.105.0", | ||
"version": "0.0.18-canary.15.110.0", | ||
"author": "Andrew Lisowski <lisowski54@gmail.com>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10494
53