Proper 0.1.0 release prep
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
output/
|
||||
.build/
|
||||
.output/
|
||||
.DS_Store
|
||||
70
Makefile
Normal file
70
Makefile
Normal file
@@ -0,0 +1,70 @@
|
||||
# Muse Cross-Platform Build
|
||||
APP_NAME=muse
|
||||
VERSION?=dev
|
||||
BUILD_DIR=.build
|
||||
MAIN_PATH=./cmd/muse
|
||||
|
||||
# Go build flags
|
||||
LDFLAGS=-ldflags "-s -w -X main.version=$(VERSION)"
|
||||
|
||||
# Platform and architecture combinations
|
||||
PLATFORMS=\
|
||||
darwin/amd64 \
|
||||
darwin/arm64 \
|
||||
linux/amd64 \
|
||||
linux/arm64 \
|
||||
windows/amd64 \
|
||||
windows/arm64
|
||||
|
||||
.PHONY: build release clean help $(PLATFORMS)
|
||||
|
||||
# Default target - build all binaries
|
||||
build: $(PLATFORMS)
|
||||
|
||||
# Build for specific platform/architecture
|
||||
$(PLATFORMS):
|
||||
$(eval GOOS=$(word 1,$(subst /, ,$@)))
|
||||
$(eval GOARCH=$(word 2,$(subst /, ,$@)))
|
||||
$(eval EXT=$(if $(filter windows,$(GOOS)),.exe,))
|
||||
@echo "Building $(APP_NAME) for $(GOOS)/$(GOARCH)..."
|
||||
@mkdir -p $(BUILD_DIR)/$(GOOS)-$(GOARCH)
|
||||
GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(LDFLAGS) -o $(BUILD_DIR)/$(GOOS)-$(GOARCH)/$(APP_NAME)$(EXT) $(MAIN_PATH)
|
||||
|
||||
# Create release archives (builds first if needed)
|
||||
release: build
|
||||
@echo "Creating release archives..."
|
||||
@for platform in $(PLATFORMS); do \
|
||||
GOOS=$$(echo $$platform | cut -d'/' -f1); \
|
||||
GOARCH=$$(echo $$platform | cut -d'/' -f2); \
|
||||
EXT=""; \
|
||||
if [ "$$GOOS" = "windows" ]; then EXT=".exe"; fi; \
|
||||
ARCHIVE_NAME="$(APP_NAME)-$(VERSION)-$$GOOS-$$GOARCH"; \
|
||||
if [ "$$GOOS" = "windows" ]; then \
|
||||
cd $(BUILD_DIR)/$$GOOS-$$GOARCH && zip -q ../$$ARCHIVE_NAME.zip $(APP_NAME)$$EXT && cd ../..; \
|
||||
else \
|
||||
tar -czf $(BUILD_DIR)/$$ARCHIVE_NAME.tar.gz -C $(BUILD_DIR)/$$GOOS-$$GOARCH $(APP_NAME)$$EXT; \
|
||||
fi; \
|
||||
echo "Created $$ARCHIVE_NAME archive"; \
|
||||
done
|
||||
|
||||
# Clean build directory
|
||||
clean:
|
||||
@rm -rf $(BUILD_DIR)
|
||||
|
||||
# Help target
|
||||
help:
|
||||
@echo "Muse Audio Generator Build System"
|
||||
@echo ""
|
||||
@echo "Available targets:"
|
||||
@echo " build - Build binaries for all platforms (default)"
|
||||
@echo " release - Build binaries and create release archives"
|
||||
@echo " clean - Remove build directory"
|
||||
@echo " help - Show this help message"
|
||||
@echo ""
|
||||
@echo "Supported platforms:"
|
||||
@for platform in $(PLATFORMS); do echo " $$platform"; done
|
||||
@echo ""
|
||||
@echo "Examples:"
|
||||
@echo " make # Build all binaries"
|
||||
@echo " make release VERSION=1.0.0 # Create release archives"
|
||||
@echo " make clean # Clean build directory"
|
||||
@@ -1,4 +1,4 @@
|
||||
# Muse - A Go-based Music Generator
|
||||
# Muse - Digital Music Generator
|
||||
|
||||
Muse is my attempt at a digital music generator written in pure Go. Its is VERY experimental and is not intended for production use. Enjoy!
|
||||
|
||||
|
||||
BIN
muse-1.0.0-windows-amd64.zip
Normal file
BIN
muse-1.0.0-windows-amd64.zip
Normal file
Binary file not shown.
BIN
muse-1.0.0-windows-arm64.zip
Normal file
BIN
muse-1.0.0-windows-arm64.zip
Normal file
Binary file not shown.
Reference in New Issue
Block a user