Skip to content

Commit

Permalink
Fix building and tag v0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
synfinatic committed Dec 30, 2020
1 parent 598faed commit e3c2d44
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AlpacaScope Changelog

## Unreleased
## v0.0.3 - 2020-12-30

Changed:
- --alpaca-ip is now --alpaca-host since hostname/FQDN is supported
Expand All @@ -14,6 +14,7 @@ Added:
Fixed:
- Bug with enum for Alpaca Axis control
- Fix bug in Nexstar location (ABCDEFGH) math
- Fix issue building amd64 binaries looking like arm64

## v0.0.2 - 2020-12-23

Expand Down
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DIST_DIR ?= dist/
GOOS ?= $(shell uname -s | tr "[:upper:]" "[:lower:]")
ARCH ?= $(shell uname -m)
ifeq ($(ARCH),x86_64)
GOARCH := arm64
GOARCH := amd64
else
GOARCH := $(ARCH) # no idea if this works for other platforms....
endif
Expand Down Expand Up @@ -33,15 +33,15 @@ WINDOWS_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-windo
WINDOWS32_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-windows-386.exe
LINUX_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-linux-amd64
LINUXARM64_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-linux-arm64
DARWIN_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-darwin-arm64
DARWIN_BIN := $(DIST_DIR)$(PROJECT_NAME)-$(PROJECT_VERSION)-darwin-amd64



ALL: $(OUTPUT_NAME) ## Build binary. Needs to be a supported plaform as defined above

include help.mk # place after ALL target and before all other targets

release: windows windows32 linux linuxarm64 darwin ## Build all our release binaries
release: windows windows32 linux linux-arm64 darwin ## Build all our release binaries

.PHONY: run
run: cmd/*.go ## build and run cria using $PROGRAM_ARGS
Expand Down Expand Up @@ -112,31 +112,32 @@ precheck: test test-fmt test-tidy ## Run all tests that happen in a PR
# Build targets for our supported plaforms
windows: $(WINDOWS_BIN) ## Build 64bit Windows binary

$(WINDOWS_BIN): cmd/*.go alpaca/*.go .prepare
GO_BUILD_DEPS: cmd/*.go alpaca/*.go telelscope/*.go .prepare

$(WINDOWS_BIN): $(GO_BUILD_DEPS)
GOARCH=amd64 GOOS=windows go build -ldflags='$(LDFLAGS)' -o $(WINDOWS_BIN) cmd/*.go
@echo "Created: $(WINDOWS_BIN)"

windows32: $(WINDOWS32_BIN) ## Build 32bit Windows binary

$(WINDOWS32_BIN):cmd/*.go alpaca/*.go .prepare
$(WINDOWS32_BIN): $(GO_BUILD_DEPS)
GOARCH=386 GOOS=windows go build -ldflags='$(LDFLAGS)' -o $(WINDOWS32_BIN) cmd/*.go
@echo "Created: $(WINDOWS32_BIN)"

linux: $(LINUX_BIN) ## Build Linux/x86_64 binary

$(LINUX_BIN): cmd/*.go alpaca/*.go .prepare
$(LINUX_BIN): $(GO_BUILD_DEPS)
GOARCH=amd64 GOOS=linux go build -ldflags='$(LDFLAGS)' -o $(LINUX_BIN) cmd/*.go
@echo "Created: $(LINUX_BIN)"

linuxarm64: $(LINUXARM64_BIN) ## Build Linux/arm64 binary
linux-arm64: $(LINUXARM64_BIN) ## Build Linux/arm64 binary

$(LINUXARM64_BIN): cmd/*.go alpaca/*.go .prepare
$(LINUXARM64_BIN): $(GO_BUILD_DEPS)
GOARCH=arm64 GOOS=linux go build -ldflags='$(LDFLAGS)' -o $(LINUXARM64_BIN) cmd/*.go
@echo "Created: $(LINUXARM64_BIN)"

darwin: $(DARWIN_BIN) ## Build MacOS/x86_64 binary

$(DARWIN_BIN): cmd/*.go alpaca/*.go .prepare
$(DARWIN_BIN): $(GO_BUILD_DEPS)
GOARCH=amd64 GOOS=darwin go build -ldflags='$(LDFLAGS)' -o $(DARWIN_BIN) cmd/*.go
@echo "Created: $(DARWIN_BIN)"

0 comments on commit e3c2d44

Please sign in to comment.