Skip to content

Commit

Permalink
make release
Browse files Browse the repository at this point in the history
  • Loading branch information
Unbewohnte committed Jan 4, 2022
1 parent 0ac9cd2 commit e4c086b
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ INSTALLATION_SCRIPT := install.sh
all:
cd $(SRC_DIR) && go build && mv $(EXE_NAME) ..

pkgrelease:
release:
rm -rf $(RELEASE_DIR)

mkdir $(RELEASE_DIR)
mkdir $(RELEASE_DIR)/linux_amd64
mkdir $(RELEASE_DIR)/darwin_amd64
mkdir $(RELEASE_DIR)/windows_amd64
mkdir $(RELEASE_DIR)/ftu_linux_amd64
mkdir $(RELEASE_DIR)/ftu_darwin_amd64
mkdir $(RELEASE_DIR)/ftu_windows_amd64

cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ftu && mv ftu ../$(RELEASE_DIR)/linux_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ftu && mv ftu ../$(RELEASE_DIR)/darwin_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ftu.exe && mv ftu.exe ../$(RELEASE_DIR)/windows_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ftu && mv ftu ../$(RELEASE_DIR)/ftu_linux_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ftu && mv ftu ../$(RELEASE_DIR)/ftu_darwin_amd64
cd $(SRC_DIR) && CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ftu.exe && mv ftu.exe ../$(RELEASE_DIR)/ftu_windows_amd64

cp $(LICENSE_FILE) $(RELEASE_DIR)/linux_amd64
cp $(INSTALLATION_SCRIPT) $(RELEASE_DIR)/linux_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/ftu_linux_amd64
cp $(INSTALLATION_SCRIPT) $(RELEASE_DIR)/ftu_linux_amd64

cp $(LICENSE_FILE) $(RELEASE_DIR)/darwin_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/windows_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/ftu_darwin_amd64
cp $(LICENSE_FILE) $(RELEASE_DIR)/ftu_windows_amd64

cd $(RELEASE_DIR) && zip -r linux_amd64 linux_amd64/
cd $(RELEASE_DIR) && zip -r darwin_amd64 darwin_amd64/
cd $(RELEASE_DIR) && zip -r windows_amd64 windows_amd64/
cd $(RELEASE_DIR) && zip -r ftu_linux_amd64 ftu_linux_amd64/
cd $(RELEASE_DIR) && zip -r ftu_darwin_amd64 ftu_darwin_amd64/
cd $(RELEASE_DIR) && zip -r ftu_windows_amd64 ftu_windows_amd64/

rm -rf $(RELEASE_DIR)/linux_amd64
rm -rf $(RELEASE_DIR)/darwin_amd64
rm -rf $(RELEASE_DIR)/windows_amd64
rm -rf $(RELEASE_DIR)/ftu_linux_amd64
rm -rf $(RELEASE_DIR)/ftu_darwin_amd64
rm -rf $(RELEASE_DIR)/ftu_windows_amd64

race:
cd $(SRC_DIR) && go build -race && mv $(EXE_NAME) ..
Expand Down

0 comments on commit e4c086b

Please sign in to comment.