diff --git a/Makefile b/Makefile index 5eb4af12..df9fd98d 100644 --- a/Makefile +++ b/Makefile @@ -12,15 +12,9 @@ ifeq (,$(wildcard /sys/kernel/btf/vmlinux)) BPF_HEADERS += -DBPF_NO_PRESERVE_ACCESS_INDEX endif -RELEASE_VERSION ?= $(shell git describe --always --match "v[0-9]*") IMG_NAME ?= hny/network-agent IMG_TAG ?= local -.PHONY: version -#: display the current computed project version -version: - @echo $(RELEASE_VERSION) - .PHONY: generate generate: export CFLAGS := $(BPF_HEADERS) #: generate go/bpf interop code @@ -36,10 +30,7 @@ docker-generate: .PHONY: build #: compile the agent executable build: - CGO_ENABLED=1 GOOS=linux \ - go build \ - --ldflags "-X main.Version=$(RELEASE_VERSION)" \ - -o hny-network-agent main.go + CGO_ENABLED=1 GOOS=linux go build -o hny-network-agent main.go .PHONY: docker-build #: build the agent image @@ -110,4 +101,4 @@ port-forward-pyroscope: .PHONY: unapply-pyroscope-server #: tear down pyroscope server unapply-pyroscope-server: - helm uninstall pyroscope + helm uninstall pyroscope \ No newline at end of file diff --git a/RELEASING.md b/RELEASING.md index 3d8dd600..63ea98d0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,11 +1,12 @@ # Releasing -- Update `CHANGELOG.md` with the changes since the last release. Consider automating with a command such as one of these two: +- Update version number in `main.go` +- Update `CHANGELOG.md` with the changes since the last release. Consider automating with a command such as these two: - `git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline > new-in-this-release.log` - `git log --pretty='%C(green)%d%Creset- %s | [%an](https://github.com/)'` - Commit changes, push, and open a release preparation pull request for review. - Once the pull request is merged, fetch the updated `main` branch. -- Apply an annotated tag (`git tag -a`) for the new version on the merged commit (e.g. `git tag -a v0.1.0-alpha -m "v0.1.0-alpha"`) +- Apply a tag for the new version on the merged commit (e.g. `git tag -a v0.1.0-alpha -m "v0.1.0-alpha"`) - Push the tag upstream (this will kick off the release pipeline in CI) e.g. `git push origin v0.1.0-alpha` - Ensure that there is a draft GitHub release created as part of CI publish steps. - Click "generate release notes" in GitHub for full changelog notes and any new contributors diff --git a/main.go b/main.go index be51ef91..26634045 100644 --- a/main.go +++ b/main.go @@ -23,8 +23,7 @@ import ( semconv "go.opentelemetry.io/otel/semconv/v1.20.0" ) -var Version string = "dev" - +const Version string = "0.0.15-alpha" const defaultDataset = "hny-network-agent" const defaultEndpoint = "https://api.honeycomb.io"