Skip to content

Commit

Permalink
Updated Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tepinly committed Sep 21, 2024
1 parent 233f929 commit 8bc0081
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,31 @@ OUT_LINUX_ARM = mongogrator-linux-arm64
OUT_WINDOWS = mongogrator-windows
OUT_MAC = mongogrator-mac
OUT_MAC_ARM = mongogrator-mac-arm64
MONGOGRATOR = mongogrator

linux:
bun build --compile --minify --sourcemap --target=bun-linux-x64 $(SRC_FILE) --outfile $(MONGOGRATOR)
bun build --compile --minify --sourcemap --target=bun-linux-x64 $(SRC_FILE) --outfile $(BIN_DIR)/$(OUT_LINUX)

linux-arm:
bun build --compile --minify --sourcemap --target=bun-linux-arm64 $(SRC_FILE) --outfile $(MONGOGRATOR)
bun build --compile --minify --sourcemap --target=bun-linux-arm64 $(SRC_FILE) --outfile $(BIN_DIR)/$(OUT_LINUX_ARM)

windows:
bun build --compile --minify --sourcemap --target=bun-windows-x64 $(SRC_FILE) --outfile $(MONGOGRATOR)
bun build --compile --minify --sourcemap --target=bun-windows-x64 $(SRC_FILE) --outfile $(BIN_DIR)/$(OUT_WINDOWS)

macos:
bun build --compile --minify --sourcemap --target=bun-darwin-x64 $(SRC_FILE) --outfile $(MONGOGRATOR)
bun build --compile --minify --sourcemap --target=bun-darwin-x64 $(SRC_FILE) --outfile $(BIN_DIR)/$(OUT_MAC)

macos-arm:
bun build --compile --minify --sourcemap --target=bun-darwin-arm64 $(SRC_FILE) --outfile $(MONGOGRATOR)
bun build --compile --minify --sourcemap --target=bun-darwin-arm64 $(SRC_FILE) --outfile $(BIN_DIR)/$(OUT_MAC_ARM)

clean:
rm -rf $(BIN_DIR)

compress-all:
tar -czvf $(BIN_DIR)/$(OUT_LINUX).tar.gz $(BIN_DIR)/$(MONGOGRATOR)
tar -czvf $(BIN_DIR)/$(OUT_LINUX_ARM).tar.gz $(BIN_DIR)/$(MONGOGRATOR)
tar -czvf $(BIN_DIR)/$(OUT_MAC).tar.gz $(BIN_DIR)/$(MONGOGRATOR)
tar -czvf $(BIN_DIR)/$(OUT_MAC_ARM).tar.gz $(BIN_DIR)/$(MONGOGRATOR)
zip -9 -y $(BIN_DIR)/$(OUT_WINDOWS).zip $(BIN_DIR)/$(MONGOGRATOR).exe
tar -czvf $(OUT_LINUX).tar.gz $(BIN_DIR)/$(OUT_LINUX)
tar -czvf $(OUT_LINUX_ARM).tar.gz $(BIN_DIR)/$(OUT_LINUX_ARM)
tar -czvf $(OUT_MAC).tar.gz $(BIN_DIR)/$(OUT_MAC)
tar -czvf $(OUT_MAC_ARM).tar.gz $(BIN_DIR)/$(OUT_MAC_ARM)
zip -9 -y $(OUT_WINDOWS).zip $(BIN_DIR)/$(OUT_WINDOWS).exe

# Build and compress for all platforms
ci: clean linux linux-arm macos macos-arm windows compress-all

ci: clean linux linux-arm macos macos-arm windows compress-all

0 comments on commit 8bc0081

Please sign in to comment.