Skip to content
Open
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
22 changes: 22 additions & 0 deletions .github/workflows/functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main

- name: Check and Lint
Expand Down Expand Up @@ -72,6 +74,8 @@ jobs:
run: git config --global core.autocrlf false

- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main

- name: Run Unit Tests
Expand Down Expand Up @@ -109,6 +113,8 @@ jobs:
run: git config --global core.autocrlf false

- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main

# Toolchains
Expand Down Expand Up @@ -150,6 +156,8 @@ jobs:
KUBECONFIG: ${{github.workspace}}/hack/bin/kubeconfig.yaml
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- uses: endersonmenezes/free-disk-space@v3
with:
Expand Down Expand Up @@ -211,6 +219,8 @@ jobs:
FUNC_CLUSTER_KEDA: "false" # these tests don't use KEDA; skip it to free cluster CPU (PR #3914 'Insufficient cpu')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- uses: endersonmenezes/free-disk-space@v3
with:
Expand Down Expand Up @@ -272,6 +282,8 @@ jobs:
FUNC_E2E_VERBOSE: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main

- uses: endersonmenezes/free-disk-space@v3
Expand Down Expand Up @@ -341,6 +353,8 @@ jobs:
FUNC_E2E_MATRIX_RUNTIMES: ${{ matrix.runtime }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- uses: endersonmenezes/free-disk-space@v3
with:
Expand Down Expand Up @@ -419,6 +433,8 @@ jobs:
FUNC_E2E_VERBOSE: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- uses: endersonmenezes/free-disk-space@v3
with:
Expand Down Expand Up @@ -476,6 +492,8 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- name: Build Platform Binaries
run: make cross-platform
Expand Down Expand Up @@ -522,6 +540,8 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- uses: docker/setup-qemu-action@v3
- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -565,6 +585,8 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- run: ko build --platform=linux/ppc64le,linux/s390x,linux/amd64,linux/arm64 -B ./cmd/func
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ BIN_GOIMPORTS ?= "$(PWD)/bin/goimports"
HASH := $(shell git rev-parse --short HEAD 2>/dev/null)
VTAG := $(shell git tag --points-at HEAD | head -1)
VTAG := $(shell [ -z $(VTAG) ] && echo $(ETAG) || echo $(VTAG))
VERS ?= $(shell git describe --tags --match 'v*')
KVER ?= $(shell git describe --tags --match 'knative-*')
VERS ?= $(shell git describe --tags --match 'v*' 2>/dev/null || echo "v0.0.0")
KVER ?= $(shell git describe --tags --match 'knative-*' 2>/dev/null || echo "knative-v0.0.0")

LDFLAGS := -X knative.dev/func/pkg/version.Vers=$(VERS) -X knative.dev/func/pkg/version.Kver=$(KVER) -X knative.dev/func/pkg/version.Hash=$(HASH)

Expand Down
4 changes: 2 additions & 2 deletions hack/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ function build_release() {
go_module_version="v0.$(( $(minor_version "$TAG") + 27 )).$(patch_version "$TAG")"
fi
else
knative_version="$(git describe --tags --match 'knative-*')"
go_module_version="$(git describe --tags --match 'v*')"
knative_version="$(git describe --tags --match 'knative-*' 2>/dev/null || git rev-parse --short HEAD)"
go_module_version="$(git describe --tags --match 'v*' 2>/dev/null || git rev-parse --short HEAD)"
fi
VERS="${go_module_version}" KVER="${knative_version}" make cross-platform

Expand Down