Skip to content

Commit

Permalink
Merge pull request #39 from elabpro/FIX-VERSION
Browse files Browse the repository at this point in the history
Fix version info in build
  • Loading branch information
elabpro authored Nov 1, 2024
2 parents 75a3bb8 + 8eff13b commit 58c7d84
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM golang:1.22 as builder
ARG APP_VERSION=no-APP_VERSION-supplied-in-buildtime
RUN mkdir /app
WORKDIR /app
COPY . /app
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ build-macos: lint pre-build

build: lint pre-build
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -ldflags=${LDFLAGS} -o ${BUILD_DIR}/${BINARY_NAME} main.go
strip bin/${BINARY_NAME}
strip ${BUILD_DIR}/${BINARY_NAME}

clear:
rm -rf bin/${BINARY_NAME}
rm -rf ${BUILD_DIR}/${BINARY_NAME}

dep:
go mod download

docker:
docker build --force-rm -t $(BINARY_NAME) .
docker build --force-rm -t $(BINARY_NAME) --build-arg APP_VERSION=${APP_VERSION} .

test:
if [ "$(shell uname)" = "Linux" ]; then make build; else make build-macos; fi
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ ginkgo test -vvv ./tests
### How to develop

- develop a feature
- invoke `changie new` and complete a small interactive form
- don't forget to changie-generated file to your PR
- invoke `changie new` and complete a small interactive form. (Get changie from https://changie.dev )
- don't forget to changie-generated file to your PR into master branch

### How to release a new version

1. Invoke `create-release-pr` job, it will create a PR with `CHANGELOG.md` containing all diffs
1. Invoke Github action `create-release-pr` job, it will create a PR with `CHANGELOG.md` containing all diffs
2. After making sure that `CHANGELOG.md` looks nice, just merge the PR from step 1, and the commit into master
will be automatically tagged, and a new release with new binaries will be automatically published!

0 comments on commit 58c7d84

Please sign in to comment.