Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add version in afterPublish hook #608

Merged
merged 3 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/shipjs/src/flow/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function release({ help = false, dir = '.', dryRun = false }) {
runBuild({ isYarn, config, dir, dryRun });
await runBeforePublish({ config, dir, dryRun });
runPublish({ isYarn, config, releaseTag, dir, dryRun });
await runAfterPublish({ config, dir, dryRun });
await runAfterPublish({ version, config, dir, dryRun });
const { tagName } = createGitTag({ version, config, dir, dryRun });
gitPush({ tagName, config, dir, dryRun });
await createGitHubRelease({ version, config, dir, dryRun });
Expand Down
4 changes: 2 additions & 2 deletions packages/shipjs/src/step/release/runAfterPublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import runStep from '../runStep';
import { wrapExecWithDir, print } from '../../util';
import { info } from '../../color';

export default ({ config, dir, dryRun }) =>
export default ({ version, config, dir, dryRun }) =>
runStep(
{
title: 'Running "afterPublish" callback.',
Expand All @@ -14,6 +14,6 @@ export default ({ config, dir, dryRun }) =>
print(`-> execute ${info('afterPublish()')} callback.`);
return;
}
await config.afterPublish({ exec: wrapExecWithDir(dir), dir });
await config.afterPublish({ exec: wrapExecWithDir(dir), dir, version });
}
);