Drop common.CurrentArch() in favor of osbuild/images

Drop `common.CurrentArch()` implementation and use
`arch.Current().String()` from the osbuild/images instead.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-01-19 21:05:46 +01:00 committed by Achilleas Koutsou
parent c4e5ab5aca
commit 43e87632fb
11 changed files with 20 additions and 73 deletions

View file

@ -18,8 +18,8 @@ import (
"github.com/BurntSushi/toml"
"github.com/google/go-cmp/cmp"
"github.com/google/uuid"
"github.com/osbuild/images/pkg/arch"
"github.com/osbuild/images/pkg/distro"
"github.com/osbuild/osbuild-composer/internal/common"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@ -245,7 +245,7 @@ func GenerateCIArtifactName(prefix string) (string, error) {
return "", fmt.Errorf("The environment variables must specify BRANCH_NAME, BUILD_ID, and DISTRO_CODE")
}
arch := common.CurrentArch()
arch := arch.Current().String()
return fmt.Sprintf("%s%s-%s-%s-%s", prefix, distroCode, arch, branchName, buildId), nil
}