MCPcopy Create free account
hub / github.com/lerna/lerna / gitCommitAndTagVersion

Method gitCommitAndTagVersion

libs/commands/version/src/index.ts:919–933  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

917 }
918
919 async gitCommitAndTagVersion() {
920 const version = this.globalVersion;
921 const tag = `${this.tagPrefix}${version}`;
922 const message = this.options.message
923 ? this.options.message.replace(/%s/g, tag).replace(/%v/g, version!)
924 : tag;
925
926 if (await this.hasChanges()) {
927 await gitCommit(message, this.gitOpts!, this.execOpts);
928 }
929
930 await gitTag(tag, this.gitOpts!, this.execOpts, this.options.gitTagCommand);
931
932 return [tag];
933 }
934
935 gitPushToRemote() {
936 this.logger.info("git", "Pushing tags...");

Callers 1

commitAndTagUpdatesMethod · 0.95

Calls 3

hasChangesMethod · 0.95
gitCommitFunction · 0.90
gitTagFunction · 0.90

Tested by

no test coverage detected