mirror of
https://github.com/goreleaser/goreleaser-action
synced 2026-08-30 19:38:27 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b953231f81 | ||
|
|
c127c9be61 | ||
|
|
affd781166 | ||
|
|
39419c3fac | ||
|
|
a80c8fd82d | ||
|
|
79d4afbba1 | ||
|
|
5df302e5e9 | ||
|
|
69b075db94 | ||
|
|
13b378d620 | ||
|
|
cb1d514d21 | ||
|
|
2efe451c4b | ||
|
|
fcc88bd028 | ||
|
|
25383ef1e0 | ||
|
|
bc087ef4b9 | ||
|
|
f9141d00ae | ||
|
|
1bdedc7bba |
+3
-2
@@ -1,2 +1,3 @@
|
|||||||
github: crazy-max
|
github: [crazy-max, caarlos0]
|
||||||
custom: https://www.paypal.me/crazyws
|
open_collective: goreleaser
|
||||||
|
custom: ["https://goreleaser.com/pro"]
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- windows-latest
|
- windows-latest
|
||||||
version:
|
version:
|
||||||
- latest
|
- latest
|
||||||
- '~> 0.166'
|
- '~> 0.182'
|
||||||
distribution:
|
distribution:
|
||||||
- goreleaser
|
- goreleaser
|
||||||
- goreleaser-pro
|
- goreleaser-pro
|
||||||
@@ -120,9 +120,9 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Import GPG key
|
name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: crazy-max/ghaction-import-gpg@v3
|
uses: crazy-max/ghaction-import-gpg@v4
|
||||||
with:
|
with:
|
||||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY_TEST }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE_TEST }}
|
passphrase: ${{ secrets.PASSPHRASE_TEST }}
|
||||||
-
|
-
|
||||||
name: Check
|
name: Check
|
||||||
@@ -174,3 +174,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: myapp
|
name: myapp
|
||||||
path: ./test/dist/*
|
path: ./test/dist/*
|
||||||
|
|
||||||
|
current-tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
-
|
||||||
|
name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
-
|
||||||
|
name: GoReleaser
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
args: release --skip-publish --rm-dist
|
||||||
|
workdir: ./test
|
||||||
|
env:
|
||||||
|
GORELEASER_CURRENT_TAG: v1.2.3
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2019-2021 CrazyMax
|
Copyright (c) 2019-2022 CrazyMax
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<a href="https://github.com/marketplace/actions/goreleaser-action"><img alt="GitHub marketplace" src="https://img.shields.io/badge/marketplace-goreleaser--action-blue?logo=github&style=flat-square"></a>
|
<a href="https://github.com/marketplace/actions/goreleaser-action"><img alt="GitHub marketplace" src="https://img.shields.io/badge/marketplace-goreleaser--action-blue?logo=github&style=flat-square"></a>
|
||||||
<a href="https://github.com/goreleaser/goreleaser-action/actions?workflow=test"><img alt="Test workflow" src="https://img.shields.io/github/workflow/status/goreleaser/goreleaser-action/test?label=test&logo=github&style=flat-square"></a>
|
<a href="https://github.com/goreleaser/goreleaser-action/actions?workflow=test"><img alt="Test workflow" src="https://img.shields.io/github/workflow/status/goreleaser/goreleaser-action/test?label=test&logo=github&style=flat-square"></a>
|
||||||
<a href="https://codecov.io/gh/goreleaser/goreleaser-action"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/goreleaser/goreleaser-action?logo=codecov&style=flat-square"></a>
|
<a href="https://codecov.io/gh/goreleaser/goreleaser-action"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/goreleaser/goreleaser-action?logo=codecov&style=flat-square"></a>
|
||||||
<a href="https://github.com/sponsors/crazy-max"><img src="https://img.shields.io/badge/sponsor-crazy--max-181717.svg?logo=github&style=flat-square" alt="Become a sponsor"></a>
|
|
||||||
</p>
|
</p>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -23,6 +22,7 @@ ___
|
|||||||
* [Install Only](#install-only)
|
* [Install Only](#install-only)
|
||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
|
* [outputs](#outputs)
|
||||||
* [environment variables](#environment-variables)
|
* [environment variables](#environment-variables)
|
||||||
* [Limitation](#limitation)
|
* [Limitation](#limitation)
|
||||||
* [Development](#development)
|
* [Development](#development)
|
||||||
@@ -51,8 +51,6 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Set up Go
|
name: Set up Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
|
||||||
go-version: 1.15
|
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
@@ -98,15 +96,16 @@ Or with a condition on GoReleaser step:
|
|||||||
|
|
||||||
### Signing
|
### Signing
|
||||||
|
|
||||||
If [signing is enabled](https://goreleaser.com/customization/#Signing) in your GoReleaser configuration, you can use the [Import GPG](https://github.com/crazy-max/ghaction-import-gpg) GitHub Action along with this one:
|
If [signing is enabled](https://goreleaser.com/customization/#Signing) in your GoReleaser configuration, you can use
|
||||||
|
the [Import GPG](https://github.com/crazy-max/ghaction-import-gpg) GitHub Action along with this one:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
-
|
-
|
||||||
name: Import GPG key
|
name: Import GPG key
|
||||||
id: import_gpg
|
id: import_gpg
|
||||||
uses: crazy-max/ghaction-import-gpg@v3
|
uses: crazy-max/ghaction-import-gpg@v4
|
||||||
with:
|
with:
|
||||||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
|
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
passphrase: ${{ secrets.PASSPHRASE }}
|
passphrase: ${{ secrets.PASSPHRASE }}
|
||||||
-
|
-
|
||||||
name: Run GoReleaser
|
name: Run GoReleaser
|
||||||
@@ -179,6 +178,15 @@ Following inputs can be used as `step.with` keys
|
|||||||
|
|
||||||
> **¹** Can be a fixed version like `v0.117.0` or a max satisfying semver one like `~> 0.132`. In this case this will return `v0.132.1`.
|
> **¹** Can be a fixed version like `v0.117.0` or a max satisfying semver one like `~> 0.132`. In this case this will return `v0.132.1`.
|
||||||
|
|
||||||
|
### outputs
|
||||||
|
|
||||||
|
Following outputs are available
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|-------------------|---------|---------------------------------------|
|
||||||
|
| `artifacts` | JSON | Build result artifacts |
|
||||||
|
| `metadata` | JSON | Build result metadata |
|
||||||
|
|
||||||
### environment variables
|
### environment variables
|
||||||
|
|
||||||
Following environment variables can be used as `step.env` keys
|
Following environment variables can be used as `step.env` keys
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import * as os from 'os';
|
||||||
|
import * as context from '../src/context';
|
||||||
|
|
||||||
|
describe('setOutput', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
process.stdout.write = jest.fn();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setOutput produces the correct command', () => {
|
||||||
|
context.setOutput('some output', 'some value');
|
||||||
|
assertWriteCalls([`::set-output name=some output::some value${os.EOL}`]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setOutput handles bools', () => {
|
||||||
|
context.setOutput('some output', false);
|
||||||
|
assertWriteCalls([`::set-output name=some output::false${os.EOL}`]);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('setOutput handles numbers', () => {
|
||||||
|
context.setOutput('some output', 1.01);
|
||||||
|
assertWriteCalls([`::set-output name=some output::1.01${os.EOL}`]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Assert that process.stdout.write calls called only with the given arguments.
|
||||||
|
function assertWriteCalls(calls: string[]): void {
|
||||||
|
expect(process.stdout.write).toHaveBeenCalledTimes(calls.length);
|
||||||
|
for (let i = 0; i < calls.length; i++) {
|
||||||
|
expect(process.stdout.write).toHaveBeenNthCalledWith(i + 1, calls[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,10 +8,10 @@ describe('git', () => {
|
|||||||
expect(tag).not.toEqual('');
|
expect(tag).not.toEqual('');
|
||||||
});
|
});
|
||||||
it('returns git tag through GITHUB_SHA', async () => {
|
it('returns git tag through GITHUB_SHA', async () => {
|
||||||
process.env.GITHUB_SHA = '6e37040623d14330555c7be1603a9182cf92d32a';
|
process.env.GITHUB_SHA = '6389ff5bd287fd6948a7ccda8af8da4f0bbc856a';
|
||||||
const tag: string = await git.getTag();
|
const tag: string = await git.getTag();
|
||||||
console.log(`tag: ${tag}`);
|
console.log(`tag: ${tag}`);
|
||||||
expect(tag).toEqual('v1');
|
expect(tag).toEqual('v2.2.1');
|
||||||
});
|
});
|
||||||
it('returns git tag through GITHUB_REF', async () => {
|
it('returns git tag through GITHUB_REF', async () => {
|
||||||
process.env.GITHUB_REF = 'refs/tags/v2.2.1';
|
process.env.GITHUB_REF = 'refs/tags/v2.2.1';
|
||||||
|
|||||||
+12
-12
@@ -6,29 +6,29 @@ describe('github', () => {
|
|||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).not.toEqual('');
|
expect(release?.tag_name).not.toEqual('');
|
||||||
});
|
});
|
||||||
it('returns v0.117.0 GoReleaser GitHub release', async () => {
|
it('returns v0.182.0 GoReleaser GitHub release', async () => {
|
||||||
const release = await github.getRelease('goreleaser', 'v0.117.0');
|
const release = await github.getRelease('goreleaser', 'v0.182.0');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.117.0');
|
expect(release?.tag_name).toEqual('v0.182.0');
|
||||||
});
|
});
|
||||||
it('returns v0.132.1 GoReleaser GitHub release', async () => {
|
it('returns v0.182.1 GoReleaser GitHub release', async () => {
|
||||||
const release = await github.getRelease('goreleaser', '~> 0.132');
|
const release = await github.getRelease('goreleaser', '~> 0.182');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.132.1');
|
expect(release?.tag_name).toEqual('v0.182.1');
|
||||||
});
|
});
|
||||||
it('returns latest GoReleaser Pro GitHub release', async () => {
|
it('returns latest GoReleaser Pro GitHub release', async () => {
|
||||||
const release = await github.getRelease('goreleaser-pro', 'latest');
|
const release = await github.getRelease('goreleaser-pro', 'latest');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).not.toEqual('');
|
expect(release?.tag_name).not.toEqual('');
|
||||||
});
|
});
|
||||||
it('returns v0.166.0-pro GoReleaser Pro GitHub release', async () => {
|
it('returns v0.182.0-pro GoReleaser Pro GitHub release', async () => {
|
||||||
const release = await github.getRelease('goreleaser-pro', 'v0.166.0-pro');
|
const release = await github.getRelease('goreleaser-pro', 'v0.182.0-pro');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.166.0-pro');
|
expect(release?.tag_name).toEqual('v0.182.0-pro');
|
||||||
});
|
});
|
||||||
it('returns v0.166.1-pro GoReleaser Pro GitHub release when using semver', async () => {
|
it('returns v0.182.1-pro GoReleaser Pro GitHub release when using semver', async () => {
|
||||||
const release = await github.getRelease('goreleaser-pro', '~> 0.166');
|
const release = await github.getRelease('goreleaser-pro', '~> 0.182');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.166.1-pro');
|
expect(release?.tag_name).toEqual('v0.182.1-pro');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import * as fs from 'fs';
|
||||||
|
import * as goreleaser from '../src/goreleaser';
|
||||||
|
|
||||||
|
describe('install', () => {
|
||||||
|
it('acquires v0.182.0 version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'v0.182.0');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires latest version of GoReleaser', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser', 'latest');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires v0.182.0-pro version of GoReleaser Pro', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser-pro', 'v0.182.0-pro');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
|
||||||
|
it('acquires latest version of GoReleaser Pro', async () => {
|
||||||
|
const bin = await goreleaser.install('goreleaser-pro', 'latest');
|
||||||
|
expect(fs.existsSync(bin)).toBe(true);
|
||||||
|
}, 100000);
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('distribSuffix', () => {
|
||||||
|
it('suffixes pro distribution', async () => {
|
||||||
|
expect(goreleaser.distribSuffix('goreleaser-pro')).toEqual('-pro');
|
||||||
|
});
|
||||||
|
it('does not suffix oss distribution', async () => {
|
||||||
|
expect(goreleaser.distribSuffix('goreleaser')).toEqual('');
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
import fs = require('fs');
|
|
||||||
import * as installer from '../src/installer';
|
|
||||||
|
|
||||||
describe('installer', () => {
|
|
||||||
it('acquires v0.117.0 version of GoReleaser', async () => {
|
|
||||||
const goreleaser = await installer.getGoReleaser('goreleaser', 'v0.117.0');
|
|
||||||
expect(fs.existsSync(goreleaser)).toBe(true);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it('acquires latest version of GoReleaser', async () => {
|
|
||||||
const goreleaser = await installer.getGoReleaser('goreleaser', 'latest');
|
|
||||||
expect(fs.existsSync(goreleaser)).toBe(true);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it('acquires v0.166.0-pro version of GoReleaser Pro', async () => {
|
|
||||||
const goreleaser = await installer.getGoReleaser('goreleaser-pro', 'v0.166.0-pro');
|
|
||||||
expect(fs.existsSync(goreleaser)).toBe(true);
|
|
||||||
}, 100000);
|
|
||||||
|
|
||||||
it('acquires latest version of GoReleaser Pro', async () => {
|
|
||||||
const goreleaser = await installer.getGoReleaser('goreleaser-pro', 'latest');
|
|
||||||
expect(fs.existsSync(goreleaser)).toBe(true);
|
|
||||||
}, 100000);
|
|
||||||
});
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
import * as pro from '../src/pro';
|
|
||||||
|
|
||||||
describe('pro', () => {
|
|
||||||
it('suffixes pro distribution', async () => {
|
|
||||||
expect(pro.suffix('goreleaser-pro')).toEqual('-pro');
|
|
||||||
});
|
|
||||||
it('does not suffix oss distribution', async () => {
|
|
||||||
expect(pro.suffix('goreleaser')).toEqual('');
|
|
||||||
});
|
|
||||||
});
|
|
||||||
+7
-1
@@ -1,7 +1,7 @@
|
|||||||
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
||||||
name: 'GoReleaser Action'
|
name: 'GoReleaser Action'
|
||||||
description: 'GitHub Action for GoReleaser, a release automation tool for Go projects'
|
description: 'GitHub Action for GoReleaser, a release automation tool for Go projects'
|
||||||
author: 'crazy-max'
|
author: 'goreleaser'
|
||||||
branding:
|
branding:
|
||||||
color: 'green'
|
color: 'green'
|
||||||
icon: 'package'
|
icon: 'package'
|
||||||
@@ -27,6 +27,12 @@ inputs:
|
|||||||
default: 'false'
|
default: 'false'
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
artifacts:
|
||||||
|
description: 'Build result artifacts'
|
||||||
|
metadata:
|
||||||
|
description: 'Build result metadata'
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
+8285
-176
File diff suppressed because one or more lines are too long
+4
-2
@@ -21,10 +21,12 @@
|
|||||||
"author": "CrazyMax",
|
"author": "CrazyMax",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.4.0",
|
"@actions/core": "^1.6.0",
|
||||||
"@actions/exec": "^1.1.0",
|
"@actions/exec": "^1.1.0",
|
||||||
"@actions/http-client": "^1.0.11",
|
"@actions/http-client": "^1.0.11",
|
||||||
"@actions/tool-cache": "^1.7.1"
|
"@actions/tool-cache": "^1.7.1",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
|
"yargs": "^17.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.24",
|
"@types/jest": "^26.0.24",
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
import * as os from 'os';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import {issueCommand} from '@actions/core/lib/command';
|
||||||
|
|
||||||
|
export const osPlat: string = os.platform();
|
||||||
|
export const osArch: string = os.arch();
|
||||||
|
|
||||||
|
export interface Inputs {
|
||||||
|
distribution: string;
|
||||||
|
version: string;
|
||||||
|
args: string;
|
||||||
|
workdir: string;
|
||||||
|
installOnly: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getInputs(): Promise<Inputs> {
|
||||||
|
return {
|
||||||
|
distribution: core.getInput('distribution') || 'goreleaser',
|
||||||
|
version: core.getInput('version'),
|
||||||
|
args: core.getInput('args'),
|
||||||
|
workdir: core.getInput('workdir') || '.',
|
||||||
|
installOnly: core.getBooleanInput('install-only')
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
// FIXME: Temp fix https://github.com/actions/toolkit/issues/777
|
||||||
|
export function setOutput(name: string, value: any): void {
|
||||||
|
issueCommand('set-output', {name}, value);
|
||||||
|
}
|
||||||
+6
-8
@@ -1,7 +1,7 @@
|
|||||||
import * as httpm from '@actions/http-client';
|
import * as goreleaser from './goreleaser';
|
||||||
import * as core from '@actions/core';
|
|
||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
import * as pro from './pro';
|
import * as core from '@actions/core';
|
||||||
|
import * as httpm from '@actions/http-client';
|
||||||
|
|
||||||
export interface GitHubRelease {
|
export interface GitHubRelease {
|
||||||
id: number;
|
id: number;
|
||||||
@@ -22,13 +22,13 @@ const resolveVersion = async (distribution: string, version: string): Promise<st
|
|||||||
}
|
}
|
||||||
core.debug(`Found ${allTags.length} tags in total`);
|
core.debug(`Found ${allTags.length} tags in total`);
|
||||||
|
|
||||||
if (version === 'latest' || !pro.isPro(distribution)) {
|
if (version === 'latest' || !goreleaser.isPro(distribution)) {
|
||||||
return semver.maxSatisfying(allTags, version);
|
return semver.maxSatisfying(allTags, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
const cleanTags: Array<string> = allTags.map(tag => cleanTag(tag));
|
const cleanTags: Array<string> = allTags.map(tag => cleanTag(tag));
|
||||||
const cleanVersion: string = cleanTag(version);
|
const cleanVersion: string = cleanTag(version);
|
||||||
return semver.maxSatisfying(cleanTags, cleanVersion) + pro.suffix(distribution);
|
return semver.maxSatisfying(cleanTags, cleanVersion) + goreleaser.distribSuffix(distribution);
|
||||||
};
|
};
|
||||||
|
|
||||||
interface GitHubTag {
|
interface GitHubTag {
|
||||||
@@ -37,15 +37,13 @@ interface GitHubTag {
|
|||||||
|
|
||||||
const getAllTags = async (distribution: string): Promise<Array<string>> => {
|
const getAllTags = async (distribution: string): Promise<Array<string>> => {
|
||||||
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
|
const http: httpm.HttpClient = new httpm.HttpClient('goreleaser-action');
|
||||||
const suffix: string = pro.suffix(distribution);
|
const suffix: string = goreleaser.distribSuffix(distribution);
|
||||||
const url: string = `https://goreleaser.com/static/releases${suffix}.json`;
|
const url: string = `https://goreleaser.com/static/releases${suffix}.json`;
|
||||||
const getTags = http.getJson<Array<GitHubTag>>(url);
|
const getTags = http.getJson<Array<GitHubTag>>(url);
|
||||||
|
|
||||||
return getTags.then(response => {
|
return getTags.then(response => {
|
||||||
if (response.result == null) {
|
if (response.result == null) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return response.result.map(obj => obj.tag_name);
|
return response.result.map(obj => obj.tag_name);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,111 @@
|
|||||||
|
import * as fs from 'fs';
|
||||||
|
import * as path from 'path';
|
||||||
|
import * as util from 'util';
|
||||||
|
import yaml from 'js-yaml';
|
||||||
|
import * as context from './context';
|
||||||
|
import * as github from './github';
|
||||||
|
import * as core from '@actions/core';
|
||||||
|
import * as tc from '@actions/tool-cache';
|
||||||
|
|
||||||
|
export async function install(distribution: string, version: string): Promise<string> {
|
||||||
|
const release: github.GitHubRelease | null = await github.getRelease(distribution, version);
|
||||||
|
if (!release) {
|
||||||
|
throw new Error(`Cannot find GoReleaser ${version} release`);
|
||||||
|
}
|
||||||
|
|
||||||
|
const filename = getFilename(distribution);
|
||||||
|
const downloadUrl = util.format(
|
||||||
|
'https://github.com/goreleaser/%s/releases/download/%s/%s',
|
||||||
|
distribution,
|
||||||
|
release.tag_name,
|
||||||
|
filename
|
||||||
|
);
|
||||||
|
|
||||||
|
core.info(`Downloading ${downloadUrl}`);
|
||||||
|
const downloadPath: string = await tc.downloadTool(downloadUrl);
|
||||||
|
core.debug(`Downloaded to ${downloadPath}`);
|
||||||
|
|
||||||
|
core.info('Extracting GoReleaser');
|
||||||
|
let extPath: string;
|
||||||
|
if (context.osPlat == 'win32') {
|
||||||
|
extPath = await tc.extractZip(downloadPath);
|
||||||
|
} else {
|
||||||
|
extPath = await tc.extractTar(downloadPath);
|
||||||
|
}
|
||||||
|
core.debug(`Extracted to ${extPath}`);
|
||||||
|
|
||||||
|
const cachePath: string = await tc.cacheDir(extPath, 'goreleaser-action', release.tag_name.replace(/^v/, ''));
|
||||||
|
core.debug(`Cached to ${cachePath}`);
|
||||||
|
|
||||||
|
const exePath: string = path.join(cachePath, context.osPlat == 'win32' ? 'goreleaser.exe' : 'goreleaser');
|
||||||
|
core.debug(`Exe path is ${exePath}`);
|
||||||
|
|
||||||
|
return exePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const distribSuffix = (distribution: string): string => {
|
||||||
|
return isPro(distribution) ? '-pro' : '';
|
||||||
|
};
|
||||||
|
|
||||||
|
export const isPro = (distribution: string): boolean => {
|
||||||
|
return distribution === 'goreleaser-pro';
|
||||||
|
};
|
||||||
|
|
||||||
|
const getFilename = (distribution: string): string => {
|
||||||
|
let arch: string;
|
||||||
|
switch (context.osArch) {
|
||||||
|
case 'x64': {
|
||||||
|
arch = 'x86_64';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'x32': {
|
||||||
|
arch = 'i386';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 'arm': {
|
||||||
|
const arm_version = (process.config.variables as any).arm_version;
|
||||||
|
arch = arm_version ? 'armv' + arm_version : 'arm';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
arch = context.osArch;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (context.osPlat == 'darwin') {
|
||||||
|
arch = 'all';
|
||||||
|
}
|
||||||
|
const platform: string = context.osPlat == 'win32' ? 'Windows' : context.osPlat == 'darwin' ? 'Darwin' : 'Linux';
|
||||||
|
const ext: string = context.osPlat == 'win32' ? 'zip' : 'tar.gz';
|
||||||
|
const suffix: string = distribSuffix(distribution);
|
||||||
|
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);
|
||||||
|
};
|
||||||
|
|
||||||
|
export async function getDistPath(yamlfile: string): Promise<string> {
|
||||||
|
const cfg = yaml.load(yamlfile);
|
||||||
|
return cfg.dist || 'dist';
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getArtifacts(distpath: string): Promise<string | undefined> {
|
||||||
|
const artifactsFile = path.join(distpath, 'artifacts.json');
|
||||||
|
if (!fs.existsSync(artifactsFile)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const content = fs.readFileSync(artifactsFile, {encoding: 'utf-8'}).trim();
|
||||||
|
if (content === 'null') {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getMetadata(distpath: string): Promise<string | undefined> {
|
||||||
|
const metadataFile = path.join(distpath, 'metadata.json');
|
||||||
|
if (!fs.existsSync(metadataFile)) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const content = fs.readFileSync(metadataFile, {encoding: 'utf-8'}).trim();
|
||||||
|
if (content === 'null') {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
import * as os from 'os';
|
|
||||||
import * as path from 'path';
|
|
||||||
import * as util from 'util';
|
|
||||||
import * as github from './github';
|
|
||||||
import * as pro from './pro';
|
|
||||||
import * as core from '@actions/core';
|
|
||||||
import * as tc from '@actions/tool-cache';
|
|
||||||
|
|
||||||
const osPlat: string = os.platform();
|
|
||||||
const osArch: string = os.arch();
|
|
||||||
|
|
||||||
export async function getGoReleaser(distribution: string, version: string): Promise<string> {
|
|
||||||
const release: github.GitHubRelease | null = await github.getRelease(distribution, version);
|
|
||||||
if (!release) {
|
|
||||||
throw new Error(`Cannot find GoReleaser ${version} release`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const filename = getFilename(distribution);
|
|
||||||
const downloadUrl = util.format(
|
|
||||||
'https://github.com/goreleaser/%s/releases/download/%s/%s',
|
|
||||||
distribution,
|
|
||||||
release.tag_name,
|
|
||||||
filename
|
|
||||||
);
|
|
||||||
|
|
||||||
core.info(`Downloading ${downloadUrl}`);
|
|
||||||
const downloadPath: string = await tc.downloadTool(downloadUrl);
|
|
||||||
core.debug(`Downloaded to ${downloadPath}`);
|
|
||||||
|
|
||||||
core.info('Extracting GoReleaser');
|
|
||||||
let extPath: string;
|
|
||||||
if (osPlat == 'win32') {
|
|
||||||
extPath = await tc.extractZip(downloadPath);
|
|
||||||
} else {
|
|
||||||
extPath = await tc.extractTar(downloadPath);
|
|
||||||
}
|
|
||||||
core.debug(`Extracted to ${extPath}`);
|
|
||||||
|
|
||||||
const cachePath: string = await tc.cacheDir(extPath, 'goreleaser-action', release.tag_name.replace(/^v/, ''));
|
|
||||||
core.debug(`Cached to ${cachePath}`);
|
|
||||||
|
|
||||||
const exePath: string = path.join(cachePath, osPlat == 'win32' ? 'goreleaser.exe' : 'goreleaser');
|
|
||||||
core.debug(`Exe path is ${exePath}`);
|
|
||||||
|
|
||||||
return exePath;
|
|
||||||
}
|
|
||||||
|
|
||||||
const getFilename = (distribution: string): string => {
|
|
||||||
const platform: string = osPlat == 'win32' ? 'Windows' : osPlat == 'darwin' ? 'Darwin' : 'Linux';
|
|
||||||
const arch: string = osArch == 'x64' ? 'x86_64' : 'i386';
|
|
||||||
const ext: string = osPlat == 'win32' ? 'zip' : 'tar.gz';
|
|
||||||
const suffix: string = pro.suffix(distribution);
|
|
||||||
return util.format('goreleaser%s_%s_%s.%s', suffix, platform, arch, ext);
|
|
||||||
};
|
|
||||||
+52
-21
@@ -1,43 +1,54 @@
|
|||||||
|
import * as fs from 'fs';
|
||||||
|
import * as path from 'path';
|
||||||
|
import yargs from 'yargs';
|
||||||
|
import * as context from './context';
|
||||||
import * as git from './git';
|
import * as git from './git';
|
||||||
import * as installer from './installer';
|
import * as goreleaser from './goreleaser';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import {dirname} from 'path';
|
|
||||||
|
|
||||||
async function run(): Promise<void> {
|
async function run(): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const distribution = core.getInput('distribution') || 'goreleaser';
|
const inputs: context.Inputs = await context.getInputs();
|
||||||
const version = core.getInput('version') || 'latest';
|
const bin = await goreleaser.install(inputs.distribution, inputs.version);
|
||||||
const args = core.getInput('args');
|
core.info(`GoReleaser ${inputs.version} installed successfully`);
|
||||||
const workdir = core.getInput('workdir') || '.';
|
|
||||||
const isInstallOnly = /^true$/i.test(core.getInput('install-only'));
|
|
||||||
const goreleaser = await installer.getGoReleaser(distribution, version);
|
|
||||||
core.info(`GoReleaser ${version} installed successfully`);
|
|
||||||
|
|
||||||
if (isInstallOnly) {
|
if (inputs.installOnly) {
|
||||||
const goreleaserDir = dirname(goreleaser);
|
const goreleaserDir = path.dirname(bin);
|
||||||
core.addPath(goreleaserDir);
|
core.addPath(goreleaserDir);
|
||||||
core.debug(`Added ${goreleaserDir} to PATH`);
|
core.debug(`Added ${goreleaserDir} to PATH`);
|
||||||
return;
|
return;
|
||||||
} else if (!args) {
|
} else if (!inputs.args) {
|
||||||
core.setFailed('args input required');
|
core.setFailed('args input required');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workdir && workdir !== '.') {
|
if (inputs.workdir && inputs.workdir !== '.') {
|
||||||
core.info(`Using ${workdir} as working directory`);
|
core.info(`Using ${inputs.workdir} as working directory`);
|
||||||
process.chdir(workdir);
|
process.chdir(inputs.workdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
const commit = await git.getShortCommit();
|
const commit = await git.getShortCommit();
|
||||||
const tag = await git.getTag();
|
const tag = await git.getTag();
|
||||||
const isTagDirty = await git.isTagDirty(tag);
|
const isTagDirty = await git.isTagDirty(tag);
|
||||||
|
|
||||||
|
let yamlfile: string | unknown;
|
||||||
|
const argv = yargs.parse(inputs.args);
|
||||||
|
if (argv.config) {
|
||||||
|
yamlfile = argv.config;
|
||||||
|
} else {
|
||||||
|
['.goreleaser.yaml', '.goreleaser.yml', 'goreleaser.yaml', 'goreleaser.yml'].forEach(f => {
|
||||||
|
if (fs.existsSync(f)) {
|
||||||
|
yamlfile = f;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let snapshot = '';
|
let snapshot = '';
|
||||||
if (args.split(' ').indexOf('release') > -1) {
|
if (inputs.args.split(' ').indexOf('release') > -1) {
|
||||||
if (isTagDirty) {
|
if (isTagDirty) {
|
||||||
core.info(`No tag found for commit ${commit}. Snapshot forced`);
|
if (!inputs.args.includes('--snapshot') && !inputs.args.includes('--nightly')) {
|
||||||
if (!args.includes('--snapshot')) {
|
core.info(`No tag found for commit ${commit}. Snapshot forced`);
|
||||||
snapshot = ' --snapshot';
|
snapshot = ' --snapshot';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -45,10 +56,30 @@ async function run(): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!('GORELEASER_CURRENT_TAG' in process.env)) {
|
await exec.exec(`${bin} ${inputs.args}${snapshot}`, undefined, {
|
||||||
process.env.GORELEASER_CURRENT_TAG = tag;
|
env: Object.assign({}, process.env, {
|
||||||
|
GORELEASER_CURRENT_TAG: process.env.GORELEASER_CURRENT_TAG || tag || ''
|
||||||
|
}) as {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (typeof yamlfile === 'string') {
|
||||||
|
const artifacts = await goreleaser.getArtifacts(await goreleaser.getDistPath(yamlfile));
|
||||||
|
if (artifacts) {
|
||||||
|
await core.group(`Artifacts output`, async () => {
|
||||||
|
core.info(artifacts);
|
||||||
|
context.setOutput('artifacts', artifacts);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const metadata = await goreleaser.getMetadata(await goreleaser.getDistPath(yamlfile));
|
||||||
|
if (metadata) {
|
||||||
|
await core.group(`Metadata output`, async () => {
|
||||||
|
core.info(metadata);
|
||||||
|
context.setOutput('metadata', metadata);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await exec.exec(`${goreleaser} ${args}${snapshot}`);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
export const suffix = (distribution: string): string => {
|
|
||||||
return isPro(distribution) ? '-pro' : '';
|
|
||||||
};
|
|
||||||
|
|
||||||
export const isPro = (distribution: string): boolean => {
|
|
||||||
return distribution === 'goreleaser-pro';
|
|
||||||
};
|
|
||||||
@@ -2,10 +2,12 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@actions/core@^1.2.6", "@actions/core@^1.4.0":
|
"@actions/core@^1.2.6", "@actions/core@^1.6.0":
|
||||||
version "1.4.0"
|
version "1.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.4.0.tgz#cf2e6ee317e314b03886adfeb20e448d50d6e524"
|
resolved "https://registry.yarnpkg.com/@actions/core/-/core-1.6.0.tgz#0568e47039bfb6a9170393a73f3b7eb3b22462cb"
|
||||||
integrity sha512-CGx2ilGq5i7zSLgiiGUtBCxhRRxibJYU6Fim0Q1Wg2aQL2LTnF27zbqZOrxfvFQ55eSBW0L8uVStgtKMpa0Qlg==
|
integrity sha512-NB1UAZomZlCV/LmJqkLhNTqtKfFXJZAUPcfl/zqG7EfsQdeUJtaWO98SGbuQ3pydJ3fHl2CvI/51OKYlCYYcaw==
|
||||||
|
dependencies:
|
||||||
|
"@actions/http-client" "^1.0.11"
|
||||||
|
|
||||||
"@actions/exec@^1.0.0", "@actions/exec@^1.1.0":
|
"@actions/exec@^1.0.0", "@actions/exec@^1.1.0":
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
@@ -696,10 +698,10 @@ ansi-escapes@^4.2.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-fest "^0.21.3"
|
type-fest "^0.21.3"
|
||||||
|
|
||||||
ansi-regex@^5.0.0:
|
ansi-regex@^5.0.0, ansi-regex@^5.0.1:
|
||||||
version "5.0.0"
|
version "5.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
|
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
|
||||||
integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
|
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
|
||||||
|
|
||||||
ansi-styles@^3.2.1:
|
ansi-styles@^3.2.1:
|
||||||
version "3.2.1"
|
version "3.2.1"
|
||||||
@@ -738,6 +740,11 @@ argparse@^1.0.7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
sprintf-js "~1.0.2"
|
sprintf-js "~1.0.2"
|
||||||
|
|
||||||
|
argparse@^2.0.1:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
|
||||||
|
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
|
||||||
|
|
||||||
arr-diff@^4.0.0:
|
arr-diff@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
||||||
@@ -1011,6 +1018,15 @@ cliui@^6.0.0:
|
|||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
wrap-ansi "^6.2.0"
|
wrap-ansi "^6.2.0"
|
||||||
|
|
||||||
|
cliui@^7.0.2:
|
||||||
|
version "7.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
|
||||||
|
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
|
||||||
|
dependencies:
|
||||||
|
string-width "^4.2.0"
|
||||||
|
strip-ansi "^6.0.0"
|
||||||
|
wrap-ansi "^7.0.0"
|
||||||
|
|
||||||
co@^4.6.0:
|
co@^4.6.0:
|
||||||
version "4.6.0"
|
version "4.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
|
||||||
@@ -1492,7 +1508,7 @@ gensync@^1.0.0-beta.2:
|
|||||||
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
|
||||||
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
|
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
|
||||||
|
|
||||||
get-caller-file@^2.0.1:
|
get-caller-file@^2.0.1, get-caller-file@^2.0.5:
|
||||||
version "2.0.5"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
|
||||||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||||
@@ -2292,6 +2308,13 @@ js-yaml@^3.13.1:
|
|||||||
argparse "^1.0.7"
|
argparse "^1.0.7"
|
||||||
esprima "^4.0.0"
|
esprima "^4.0.0"
|
||||||
|
|
||||||
|
js-yaml@^4.1.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602"
|
||||||
|
integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==
|
||||||
|
dependencies:
|
||||||
|
argparse "^2.0.1"
|
||||||
|
|
||||||
jsdom@^16.4.0:
|
jsdom@^16.4.0:
|
||||||
version "16.6.0"
|
version "16.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.6.0.tgz#f79b3786682065492a3da6a60a4695da983805ac"
|
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.6.0.tgz#f79b3786682065492a3da6a60a4695da983805ac"
|
||||||
@@ -3182,6 +3205,15 @@ string-width@^4.1.0, string-width@^4.2.0:
|
|||||||
is-fullwidth-code-point "^3.0.0"
|
is-fullwidth-code-point "^3.0.0"
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
|
string-width@^4.2.3:
|
||||||
|
version "4.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||||
|
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||||
|
dependencies:
|
||||||
|
emoji-regex "^8.0.0"
|
||||||
|
is-fullwidth-code-point "^3.0.0"
|
||||||
|
strip-ansi "^6.0.1"
|
||||||
|
|
||||||
strip-ansi@^6.0.0:
|
strip-ansi@^6.0.0:
|
||||||
version "6.0.0"
|
version "6.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
|
||||||
@@ -3189,6 +3221,13 @@ strip-ansi@^6.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^5.0.0"
|
ansi-regex "^5.0.0"
|
||||||
|
|
||||||
|
strip-ansi@^6.0.1:
|
||||||
|
version "6.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||||
|
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||||
|
dependencies:
|
||||||
|
ansi-regex "^5.0.1"
|
||||||
|
|
||||||
strip-bom@^4.0.0:
|
strip-bom@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
|
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
|
||||||
@@ -3261,9 +3300,9 @@ tmp@^0.2.1:
|
|||||||
rimraf "^3.0.0"
|
rimraf "^3.0.0"
|
||||||
|
|
||||||
tmpl@1.0.x:
|
tmpl@1.0.x:
|
||||||
version "1.0.4"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
|
resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc"
|
||||||
integrity sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=
|
integrity sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==
|
||||||
|
|
||||||
to-fast-properties@^2.0.0:
|
to-fast-properties@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
@@ -3531,6 +3570,15 @@ wrap-ansi@^6.2.0:
|
|||||||
string-width "^4.1.0"
|
string-width "^4.1.0"
|
||||||
strip-ansi "^6.0.0"
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
|
wrap-ansi@^7.0.0:
|
||||||
|
version "7.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
|
||||||
|
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
|
||||||
|
dependencies:
|
||||||
|
ansi-styles "^4.0.0"
|
||||||
|
string-width "^4.1.0"
|
||||||
|
strip-ansi "^6.0.0"
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
@@ -3566,6 +3614,11 @@ y18n@^4.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf"
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf"
|
||||||
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==
|
integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==
|
||||||
|
|
||||||
|
y18n@^5.0.5:
|
||||||
|
version "5.0.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
|
||||||
|
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
|
||||||
|
|
||||||
yallist@^2.1.2:
|
yallist@^2.1.2:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52"
|
||||||
@@ -3589,6 +3642,11 @@ yargs-parser@^18.1.2:
|
|||||||
camelcase "^5.0.0"
|
camelcase "^5.0.0"
|
||||||
decamelize "^1.2.0"
|
decamelize "^1.2.0"
|
||||||
|
|
||||||
|
yargs-parser@^21.0.0:
|
||||||
|
version "21.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.0.1.tgz#0267f286c877a4f0f728fceb6f8a3e4cb95c6e35"
|
||||||
|
integrity sha512-9BK1jFpLzJROCI5TzwZL/TU4gqjK5xiHV/RfWLOahrjAko/e4DJkRDZQXfvqAsiZzzYhgAzbgz6lg48jcm4GLg==
|
||||||
|
|
||||||
yargs@^15.4.1:
|
yargs@^15.4.1:
|
||||||
version "15.4.1"
|
version "15.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8"
|
||||||
@@ -3605,3 +3663,16 @@ yargs@^15.4.1:
|
|||||||
which-module "^2.0.0"
|
which-module "^2.0.0"
|
||||||
y18n "^4.0.0"
|
y18n "^4.0.0"
|
||||||
yargs-parser "^18.1.2"
|
yargs-parser "^18.1.2"
|
||||||
|
|
||||||
|
yargs@^17.3.1:
|
||||||
|
version "17.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.1.tgz#da56b28f32e2fd45aefb402ed9c26f42be4c07b9"
|
||||||
|
integrity sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==
|
||||||
|
dependencies:
|
||||||
|
cliui "^7.0.2"
|
||||||
|
escalade "^3.1.1"
|
||||||
|
get-caller-file "^2.0.5"
|
||||||
|
require-directory "^2.1.1"
|
||||||
|
string-width "^4.2.3"
|
||||||
|
y18n "^5.0.5"
|
||||||
|
yargs-parser "^21.0.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user