Skip to content

Commit

Permalink
add tmp folder to npmignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ashlymat committed Jul 4, 2023
1 parent f2a33a8 commit 7870c54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/npm/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
const (
npmBomFilename = "bom-npm.xml"
cycloneDxNpmPackageVersion = "@cyclonedx/[email protected]"
cycloneDxNpmInstallationFolder = "./tmp"
cycloneDxBomPackageVersion = "@cyclonedx/bom@^3.10.6"
cycloneDxNpmInstallationFolder = "./tmp" // This folder is also added to npmignore in publish.go.Any changes to this folder needs a change in publish.go publish()
cycloneDxSchemaVersion = "1.4"
)

Expand Down
3 changes: 3 additions & 0 deletions pkg/npm/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ func (exec *Execute) publish(packageJSON, registry, username, password string, p
npmignore.Add("**/piper")
log.Entry().Debug("adding **/sap-piper")
npmignore.Add("**/sap-piper")
// temporary installation folder used to install BOM to be ignored
log.Entry().Debug("adding tmp to npmignore")
npmignore.Add("tmp/")

npmrc := NewNPMRC(filepath.Dir(packageJSON))

Expand Down

0 comments on commit 7870c54

Please sign in to comment.