Re-add elemental package (#449)

This commit is contained in:
Itxaka 2023-09-22 09:29:41 +02:00 committed by GitHub
parent 4aa7e9efb2
commit 99fd083b17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,20 @@
requires:
- name: "toolchain-go"
category: "development"
version: ">=0"
env:
- PATH=$PATH:/usr/local/go/bin
- CGO_ENABLED=0
- REPO={{( index .Values.labels "github.repo" )}}
prelude:
- PACKAGE_VERSION=${PACKAGE_VERSION%\+*} && git clone --branch v"${PACKAGE_VERSION}" https://github.com/{{( index .Values.labels "github.owner" )}}/$REPO
steps:
- |
cd $REPO && GIT_COMMIT=$(git rev-parse HEAD) && \
go build -o bin/{{.Values.bin_name}} -ldflags "-s -w -X 'github.com/rancher/elemental-cli/internal/version.version=v${PACKAGE_VERSION}' -X 'github.com/rancher/elemental-cli/internal/version.gitCommit=${GIT_COMMIT}'" && \
mv bin/{{.Values.bin_name}} /usr/bin/{{.Values.bin_name}}
includes:
- /usr/bin/{{.Values.bin_name}}

View File

@ -0,0 +1,8 @@
name: "elemental-cli"
category: "system"
version: "0.3.1"
bin_name: "elemental"
fips: false
labels:
github.repo: "elemental-cli"
github.owner: "kairos-io"