Skip to content

Commit

Permalink
Merge pull request #232 from technote-space/release/v1.1.1
Browse files Browse the repository at this point in the history
Release/v1.1.1
  • Loading branch information
technote-space authored Feb 11, 2020
2 parents 435a32b + 164fc93 commit 9be69be
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions __tests__/git-helper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ describe('GitHelper', () => {
await helper.fetchTags(workDir, context());

execCalledWith(mockExec, [
'git tag > /dev/null 2>&1',
'git tag',
'git tag -d \'v1.2.3\' \'v1.2.4\' \'v1.2.5\' \'v1.2.6\' > /dev/null 2>&1',
'git fetch \'https://octocat:[email protected]/hello/world.git\' --tags > /dev/null 2>&1',
]);
Expand All @@ -506,7 +506,7 @@ describe('GitHelper', () => {
await helper.fetchTags(workDir, context(), 3);

execCalledWith(mockExec, [
'git tag > /dev/null 2>&1',
'git tag',
'git tag -d \'v1.2.3\' \'v1.2.4\' \'v1.2.5\' > /dev/null 2>&1',
'git tag -d \'v1.2.6\' > /dev/null 2>&1',
'git fetch \'https://octocat:[email protected]/hello/world.git\' --tags > /dev/null 2>&1',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@technote-space/github-action-helper",
"version": "1.1.0",
"version": "1.1.1",
"description": "Helper to filter GitHub Action.",
"author": {
"name": "Technote",
Expand Down
4 changes: 3 additions & 1 deletion src/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export default class Command {
const commandArgs = undefined === args ? '' : escape(args.map(item => item.trim()).filter(item => item.length));
const commandWithArgs = command + (commandArgs.length ? ' ' + commandArgs : '');
if (undefined !== altCommand) {
this.logger.displayCommand(altCommand);
if (altCommand) {
this.logger.displayCommand(altCommand);
}
} else if (!quiet) {
this.logger.displayCommand(commandWithArgs);
}
Expand Down
2 changes: 1 addition & 1 deletion src/git-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ export default class GitHelper {
*/
public getTags = async(workDir: string, options?: { quiet?: boolean; suppressOutput?: boolean }): Promise<string[]> => (await this.runCommand(workDir, {
command: 'git tag',
quiet: options?.quiet,
suppressOutput: options?.suppressOutput,
altCommand: options?.quiet ? '' : undefined,
}))[0].stdout;

/**
Expand Down

0 comments on commit 9be69be

Please sign in to comment.