From 96957bd2de2f2178ab2fc93056b35bbc40251382 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Tue, 23 Jun 2020 18:12:42 +0300 Subject: [PATCH] resolve comments --- .github/workflows/versions.yml | 35 ++++++---------------------------- __tests__/simple/simple.go | 7 ------- dist/index.js | 11 ++++------- src/installer.ts | 3 --- 4 files changed, 10 insertions(+), 46 deletions(-) delete mode 100644 __tests__/simple/simple.go diff --git a/.github/workflows/versions.yml b/.github/workflows/versions.yml index 91a8e3fa3..14f72b16d 100644 --- a/.github/workflows/versions.yml +++ b/.github/workflows/versions.yml @@ -1,7 +1,13 @@ name: Validate 'setup-go' on: push: + branches: + - master + paths-ignore: + - '**.md' pull_request: + paths-ignore: + - '**.md' schedule: - cron: 0 0 * * * @@ -27,9 +33,6 @@ jobs: run: __tests__/verify-go.sh ${{ matrix.go }} shell: bash - - name: Run simple code - run: go run __tests__/simple/simple.go - setup-versions-from-manifest: name: Setup ${{ matrix.go }} ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -51,9 +54,6 @@ jobs: run: __tests__/verify-go.sh ${{ matrix.go }} shell: bash - - name: Run simple code - run: go run __tests__/simple/simple.go - setup-versions-from-dist: name: Setup ${{ matrix.go }} ${{ matrix.os }} runs-on: ${{ matrix.os }} @@ -72,26 +72,3 @@ jobs: - name: verify go run: __tests__/verify-go.sh ${{ matrix.go }} shell: bash - - name: Run simple code - run: go run __tests__/simple/simple.go - setup-version-beta: - name: Setup beta ${{ matrix.go }} ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - go: [1.15beta1] - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: setup-go ${{ matrix.go }} - uses: ./ - with: - go-version: ${{ matrix.go }} - stable: false - - name: verify go - run: __tests__/verify-go.sh ${{ matrix.go }} - shell: bash - - name: Run simple code - run: go run __tests__/simple/simple.go \ No newline at end of file diff --git a/__tests__/simple/simple.go b/__tests__/simple/simple.go deleted file mode 100644 index 039314fbd..000000000 --- a/__tests__/simple/simple.go +++ /dev/null @@ -1,7 +0,0 @@ -package main - -import "fmt" - -func main() { - fmt.Println("Hello, world.") -} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 0bdc47e0e..2c97db222 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6997,8 +6997,8 @@ function installGoVersion(info, auth) { const downloadPath = yield tc.downloadTool(info.downloadUrl, undefined, auth); console.log('Extracting Go...'); let extPath = yield extractGoArchive(downloadPath); - if (info.type === "dist") { - extPath = path.join(extPath, "go"); + if (info.type === 'dist') { + extPath = path.join(extPath, 'go'); } console.log('Adding to the cache ...'); return yield tc.cacheDir(extPath, 'go', makeSemver(info.resolvedVersion)); @@ -7026,7 +7026,7 @@ function getInfoFromManifest(versionSpec, stable, auth) { const rel = yield tc.findFromManifest(versionSpec, stable, releases); if (rel && rel.files.length > 0) { info = {}; - info.type = "manifest"; + info.type = 'manifest'; info.resolvedVersion = rel.version; info.downloadUrl = rel.files[0].download_url; info.fileName = rel.files[0].filename; @@ -7038,16 +7038,13 @@ exports.getInfoFromManifest = getInfoFromManifest; function getInfoFromDist(versionSpec, stable) { return __awaiter(this, void 0, void 0, function* () { let version; - if (versionSpec.includes('beta')) { - versionSpec = makeSemver(versionSpec); - } version = yield findMatch(versionSpec, stable); if (!version) { return null; } let downloadUrl = `https://storage.googleapis.com/golang/${version.files[0].filename}`; return { - type: "dist", + type: 'dist', downloadUrl: downloadUrl, resolvedVersion: version.version, fileName: version.files[0].filename diff --git a/src/installer.ts b/src/installer.ts index 87f92f818..7194552a4 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -153,9 +153,6 @@ async function getInfoFromDist( stable: boolean ): Promise { let version: IGoVersion | undefined; - if (versionSpec.includes('beta')) { - versionSpec = makeSemver(versionSpec); - } version = await findMatch(versionSpec, stable); if (!version) { return null;