Skip to content

Commit

Permalink
customize for ikp
Browse files Browse the repository at this point in the history
  • Loading branch information
ttbadr committed Apr 13, 2024
1 parent 6185115 commit 393ac53
Show file tree
Hide file tree
Showing 237 changed files with 88 additions and 11,460 deletions.
44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

26 changes: 0 additions & 26 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/lint.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: release
on:
push:
branches:
- ikp

jobs:
build:
permissions: write-all
runs-on: ubuntu-20.04
steps:
- name: Install Go
uses: actions/[email protected]
with:
go-version: 1.21.1

- name: Setup GO env
run: go env -w CGO_ENABLED=0

- name: Checkout Code
uses: actions/[email protected]

- name: Build
run: make build

- name: Get Version
id: version
run: zip k9s.zip execs/*;echo "VERSION=$(make -s version)" >> $GITHUB_OUTPUT

- name: Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
tag: "${{ steps.version.outputs.VERSION }}-${{ github.ref_name }}"
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: k9s.zip
33 changes: 0 additions & 33 deletions .github/workflows/test.yml

This file was deleted.

12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DATE ?= $(shell TZ=UTC date -j -f "%s" ${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:
else
DATE ?= $(shell date -u -d @${SOURCE_DATE_EPOCH} +"%Y-%m-%dT%H:%M:%SZ")
endif
VERSION ?= v0.32.4
VERSION ?= v1.0.2
IMG_NAME := derailed/k9s
IMAGE := ${IMG_NAME}:${VERSION}

Expand All @@ -26,8 +26,11 @@ cover: ## Run test coverage suite

build: ## Builds the CLI
@CGO_ENABLED=${CGO_ENABLED} go build ${GO_FLAGS} \
-ldflags "-w -s -X ${PACKAGE}/cmd.version=${VERSION} -X ${PACKAGE}/cmd.commit=${GIT_REV} -X ${PACKAGE}/cmd.date=${DATE}" \
-a -tags=${GO_TAGS} -o ${OUTPUT_BIN} main.go
-ldflags "-w -s -X ${PACKAGE}/cmd.version=${VERSION} -X ${PACKAGE}/cmd.commit=${GIT_REV} -X ${PACKAGE}/cmd.date=${DATE}" \
-a -tags=${GO_TAGS} -o ${OUTPUT_BIN} main.go
@CGO_ENABLED=${CGO_ENABLED} GOOS=windows GOARCH=amd64 go build ${GO_FLAGS} \
-ldflags "-w -s -X ${PACKAGE}/cmd.version=${VERSION} -X ${PACKAGE}/cmd.commit=${GIT_REV} -X ${PACKAGE}/cmd.date=${DATE}" \
-a -tags=${GO_TAGS} -o ${OUTPUT_BIN}.exe main.go

kubectl-stable-version: ## Get kubectl latest stable version
@curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt
Expand All @@ -37,3 +40,6 @@ img: ## Build Docker Image

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":[^:]*?## "}; {printf "\033[38;5;69m%-30s\033[38;5;38m %s\033[0m\n", $$1, $$2}'

version:
@echo ${VERSION}
Loading

0 comments on commit 393ac53

Please sign in to comment.