Skip to content

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sammcj committed Jun 1, 2024
1 parent e61ae57 commit 810b25a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
- name: Make a new latest tag and force push it
if: ${{ steps.get_version.outputs.new_tag != 'false' }}
run: |
git fetch --tags
git checkout ${{ github.ref }}
git tag -f latest ${{ steps.get_version.outputs.new_tag }}
git push origin latest --force
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.1.8
dev
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,23 @@ test: ## Run test

build: ## Run build
$(eval GOLLAMA_VERSION := $(shell if [ -z "$(GOLLAMA_VERSION)" ]; then echo "dev"; else echo $(GOLLAMA_VERSION); fi))
echo $(GOLLAMA_VERSION) > .version
LDFLAGS="-X github.com/sammcj/gollama/cmd.Version=$(GOLLAMA_VERSION)"
@echo "Building with version: $(GOLLAMA_VERSION)"
go build -v $(LDFLAGS)
@echo "Build completed, run ./gollama"

ci: ## build for linux and macOS
# generate version
$(eval GOLLAMA_VERSION := $(shell if [ -z "$(GOLLAMA_VERSION)" ]; then echo "dev"; else echo $(GOLLAMA_VERSION); fi))
LDFLAGS="-X github.com/sammcj/gollama/cmd.Version=$(GOLLAMA_VERSION)"
@echo "Building with version: $(GOLLAMA_VERSION)"

mkdir -p ./dist/macos ./dist/linux_amd64 ./dist/linux_arm64
GOOS=darwin GOARCH=arm64 go build -o ./dist/macos/
GOOS=linux GOARCH=amd64 go build -o ./dist/linux_amd64/
GOOS=linux GOARCH=arm64 go build -o ./dist/linux_arm64/
GOOS=darwin GOARCH=arm64 go build -v $(LDFLAGS) -o ./dist/macos/
GOOS=linux GOARCH=amd64 go build -v $(LDFLAGS) -o ./dist/linux_amd64/
GOOS=linux GOARCH=arm64 go build -v $(LDFLAGS) -o ./dist/linux_arm64/

# zip up each build
zip -r gollama-macos.zip ./dist/macos/gollama
zip -r gollama-linux-amd64.zip ./dist/linux_amd64/gollama
Expand Down

0 comments on commit 810b25a

Please sign in to comment.