build: ensure build task get the proper profile name.
Some checks failed
Ubuntu / build (default, ubuntu-22.04) (push) Has been cancelled
Ubuntu / build (default, ubuntu-24.04) (push) Has been cancelled
Ubuntu / build (full-system-policy, ubuntu-22.04) (push) Has been cancelled
Ubuntu / build (full-system-policy, ubuntu-24.04) (push) Has been cancelled
Ubuntu / tests (push) Has been cancelled

This commit is contained in:
Alexandre Pujol 2024-11-11 21:18:16 +00:00
parent 72d45c2cf5
commit 0206e04b3f
Failed to generate hash of commit

View file

@ -6,6 +6,7 @@ package builder
import (
"fmt"
"strings"
"github.com/roddhjav/apparmor.d/pkg/paths"
"github.com/roddhjav/apparmor.d/pkg/prebuild"
@ -33,7 +34,7 @@ type Option struct {
func NewOption(file *paths.Path) *Option {
return &Option{
Name: file.Base(),
Name: strings.TrimSuffix(file.Base(), ".apparmor.d"),
File: file,
}
}