mirror of
https://github.com/k3s-io/k3s.git
synced 2026-02-03 20:39:49 -05:00
* Add full ci support without Dapper * Seperate git and other version tags, improves caching on binary builds * Use new local targets for build-k3s.yaml workflow * Allow optional ghcr build caching * Build binary using GHA native commands * Use internal setup-go action for e2e.yaml * Add emulation builds to k3s-build.yaml (for arm32 and future riscv64) * Be consistent in k3s artifact names * Fix package/dockerfile warnings * Fix install script for PR installs Signed-off-by: Derek Nola <derek.nola@suse.com>
25 lines
No EOL
562 B
Bash
Executable file
25 lines
No EOL
562 B
Bash
Executable file
#!/bin/bash
|
|
|
|
GIT_TAG=$DRONE_TAG
|
|
TREE_STATE=clean
|
|
COMMIT=$DRONE_COMMIT
|
|
|
|
if [ -d .git ]; then
|
|
if [ -z "$GIT_TAG" ]; then
|
|
GIT_TAG=$(git tag -l --contains HEAD | head -n 1)
|
|
fi
|
|
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
|
|
DIRTY="-dirty"
|
|
TREE_STATE=dirty
|
|
fi
|
|
|
|
COMMIT=$(git log -n3 --pretty=format:"%H %ae" | grep -v ' drone@localhost$' | cut -f1 -d\ | head -1)
|
|
if [ -z "${COMMIT}" ]; then
|
|
COMMIT=$(git rev-parse HEAD || true)
|
|
fi
|
|
fi
|
|
|
|
export GIT_TAG
|
|
export TREE_STATE
|
|
export COMMIT
|
|
export DIRTY |