Skip to content

Commit

Permalink
fix npm bug; add support for +security in rpm and in debs
Browse files Browse the repository at this point in the history
  • Loading branch information
kminehart committed Oct 2, 2024
1 parent 6ced15b commit 27ef2b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion artifacts/package_deb.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (d *Deb) BuildFile(ctx context.Context, builder *dagger.Container, opts *pi
return fpm.Build(builder, fpm.BuildOpts{
Name: d.Name,
Enterprise: d.Enterprise,
Version: d.Version,
Version: debVersion(d.Version),
BuildID: d.BuildID,
Distribution: d.Distribution,
PackageType: fpm.PackageTypeDeb,
Expand Down
2 changes: 1 addition & 1 deletion artifacts/package_rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (d *RPM) BuildFile(ctx context.Context, builder *dagger.Container, opts *pi
rpm := fpm.Build(builder, fpm.BuildOpts{
Name: d.Name,
Enterprise: d.Enterprise,
Version: d.Version,
Version: rpmVersion(d.Version),
BuildID: d.BuildID,
Distribution: d.Distribution,
PackageType: fpm.PackageTypeRPM,
Expand Down
4 changes: 2 additions & 2 deletions frontend/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
// NPMPackages returns a dagger.Directory which contains the Grafana NPM packages from the grafana source code.
func NPMPackages(builder *dagger.Container, src *dagger.Directory, ersion string) *dagger.Directory {
return builder.WithExec([]string{"mkdir", "npm-packages"}).
WithEnvVariable("SHELL", "/bin/bash").
WithExec([]string{"yarn", "install", "--immutable"}).
WithExec([]string{"yarn", "run", "packages:build"}).
WithExec([]string{"/bin/bash", "-c", fmt.Sprintf("yarn run lerna --loglevel=debug version %s --exact --no-git-tag-version --no-push --force-publish -y", ersion)}).
WithExec([]string{"/bin/bash", "-c", fmt.Sprintf("yarn lerna exec --loglevel=debug --no-private -- yarn pack --out /src/npm-packages/%%s-%v.tgz", "v"+ersion)}).
WithExec([]string{"/bin/bash", "-c", fmt.Sprintf("yarn run lerna version %s --exact --no-git-tag-version --no-push --force-publish -y && yarn lerna exec --no-private -- yarn pack --out /src/npm-packages/%%s-%v.tgz", ersion, "v"+ersion)}).
Directory("./npm-packages")
}

Expand Down

0 comments on commit 27ef2b1

Please sign in to comment.