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(describe-ref): add --tags arg to git describe #1778

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion utils/describe-ref/__tests__/describe-ref.test.js
Expand Up @@ -5,7 +5,7 @@ jest.mock("@lerna/child-process");
const childProcess = require("@lerna/child-process");
const describeRef = require("../lib/describe-ref");

const DEFAULT_ARGS = ["describe", "--always", "--long", "--dirty", "--first-parent"];
const DEFAULT_ARGS = ["describe", "--tags", "--always", "--long", "--dirty", "--first-parent"];

childProcess.exec.mockResolvedValue({ stdout: "v1.2.3-4-g567890a" });
childProcess.execSync.mockReturnValue("v1.2.3-4-g567890a");
Expand Down
2 changes: 2 additions & 0 deletions utils/describe-ref/lib/describe-ref.js
Expand Up @@ -10,6 +10,8 @@ module.exports.sync = sync;
function getArgs(options) {
const args = [
"describe",
// explicitly get tags
"--tags",
// fallback to short sha if no tags located
"--always",
// always return full result, helps identify existing release
Expand Down