Skip to content

Commit

Permalink
fix(prepare): fetch tags before figuring out next version (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjae Lee authored Nov 30, 2019
1 parent 18cc7e4 commit 045bbc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/shipjs/src/flow/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import printDryRunBanner from '../step/printDryRunBanner';
import validate from '../step/prepare/validate';
import validateMergeStrategy from '../step/prepare/validateMergeStrategy';
import pull from '../step/pull';
import fetchTags from '../step/prepare/fetchTags';
import push from '../step/prepare/push';
import getNextVersion from '../step/prepare/getNextVersion';
import confirmNextVersion from '../step/prepare/confirmNextVersion';
Expand Down Expand Up @@ -47,6 +48,7 @@ async function prepare({
validateMergeStrategy({ config });
const { remote } = config;
pull({ remote, currentBranch: baseBranch, dir, dryRun });
fetchTags({ dir, dryRun });
push({ remote, currentBranch: baseBranch, dir, dryRun });
let { nextVersion } = getNextVersion({ currentVersion, dir });
nextVersion = await confirmNextVersion({
Expand Down
7 changes: 7 additions & 0 deletions packages/shipjs/src/step/prepare/fetchTags.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import runStep from '../runStep';
import { run } from '../../util';

export default ({ dir, dryRun }) =>
runStep({ title: 'Fetching tags.' }, () => {
run({ command: `git fetch --tags`, dir, dryRun });
});

0 comments on commit 045bbc0

Please sign in to comment.