Merge pull request #20 from actions/lsep/fix-pseudotarget-filepath
Using 'all' or './...' pseudotarget uses go mod dir
This commit is contained in:
+2
-2
@@ -75,9 +75,9 @@ function main() {
|
|||||||
const directDeps = yield (0, process_1.processGoDirectDependencies)(goModDir, goBuildTarget);
|
const directDeps = yield (0, process_1.processGoDirectDependencies)(goModDir, goBuildTarget);
|
||||||
const indirectDeps = yield (0, process_1.processGoIndirectDependencies)(goModDir, goBuildTarget);
|
const indirectDeps = yield (0, process_1.processGoIndirectDependencies)(goModDir, goBuildTarget);
|
||||||
const packageCache = yield (0, process_1.processGoGraph)(goModDir, directDeps, indirectDeps);
|
const packageCache = yield (0, process_1.processGoGraph)(goModDir, directDeps, indirectDeps);
|
||||||
// no file path if using the pseudotargets "all" or "./..."
|
// if using the pseudotargets "all" or "./...", use the path to go.mod as filepath
|
||||||
const filepath = goBuildTarget === 'all' || goBuildTarget === './...'
|
const filepath = goBuildTarget === 'all' || goBuildTarget === './...'
|
||||||
? undefined
|
? goModPath
|
||||||
: path_1.default.join(goModDir, goBuildTarget);
|
: path_1.default.join(goModDir, goBuildTarget);
|
||||||
const manifest = new dependency_submission_toolkit_1.Manifest(goBuildTarget, filepath);
|
const manifest = new dependency_submission_toolkit_1.Manifest(goBuildTarget, filepath);
|
||||||
directDeps.forEach((pkgUrl) => {
|
directDeps.forEach((pkgUrl) => {
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
+2
-3
@@ -1,6 +1,5 @@
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
|
|
||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
import {
|
import {
|
||||||
@@ -51,10 +50,10 @@ async function main () {
|
|||||||
goBuildTarget
|
goBuildTarget
|
||||||
)
|
)
|
||||||
const packageCache = await processGoGraph(goModDir, directDeps, indirectDeps)
|
const packageCache = await processGoGraph(goModDir, directDeps, indirectDeps)
|
||||||
// no file path if using the pseudotargets "all" or "./..."
|
// if using the pseudotargets "all" or "./...", use the path to go.mod as filepath
|
||||||
const filepath =
|
const filepath =
|
||||||
goBuildTarget === 'all' || goBuildTarget === './...'
|
goBuildTarget === 'all' || goBuildTarget === './...'
|
||||||
? undefined
|
? goModPath
|
||||||
: path.join(goModDir, goBuildTarget)
|
: path.join(goModDir, goBuildTarget)
|
||||||
const manifest = new Manifest(goBuildTarget, filepath)
|
const manifest = new Manifest(goBuildTarget, filepath)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user