Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: align image version with version file #23

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions dapper/version
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
DIRTY="-dirty"
fi

COMMIT=$(git rev-parse --short HEAD)
VERSION=$(cat $(dirname $0)/../version)
GIT_TAG=$(git tag -l --contains HEAD | head -n 1)

if [[ -z "$DIRTY" && -n "$GIT_TAG" ]]; then
VERSION=$GIT_TAG
else
VERSION="${COMMIT}${DIRTY}"
fi

GITCOMMIT=$(git rev-parse HEAD)
GITCOMMIT="$(git rev-parse HEAD)${DIRTY}"
BUILDDATE=$(date -u --rfc-3339=seconds)
BUILDDATE=${BUILDDATE// /T}
12 changes: 10 additions & 2 deletions pkg/consts/longhornctl.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
package consts

import (
"fmt"

"github.com/longhorn/cli/meta"
)

const (
ImageBciBase = "registry.suse.com/bci/bci-base:15.5"
ImagePause = "registry.k8s.io/pause:3.1"
)

ImageEngine = "longhornio/longhorn-engine:master-head"
ImageLonghornctl = "longhornio/longhornctl:master-head"
var (
ImageEngine = fmt.Sprintf("longhornio/longhorn-engine:%s", meta.Version)
ImageLonghornctl = fmt.Sprintf("longhornio/longhornctl:%s", meta.Version)
)

const (
Expand Down