github.com/upyun/upx@v0.4.7-0.20240419023638-b184a7cb7c10/Makefile (about)

     1  ifndef VER
     2  	VER= latest
     3  endif
     4  
     5  APP= upx
     6  ROOT= $(shell echo $(GOPATH) | awk -F':' '{print $$1}')
     7  PROJ_DIR= $(ROOT)/src/upyun.com
     8  PWD= $(shell pwd)
     9  
    10  app:
    11  	go build -o $(APP) ./cmd/upx/
    12  
    13  test:
    14  	go test -v .
    15  
    16  release:
    17  	goreleaser --rm-dist
    18  
    19  upload: release
    20  	./upx pwd
    21  	./upx put dist/upx_darwin_amd64/upx /softwares/upx/upx_darwin_amd64_$(VER); \
    22  
    23  	for ARCH in amd64 386 arm64 arm_6 arm_7; do \
    24  		./upx put dist/upx_linux_$$ARCH/upx /softwares/upx/upx_linux_$$ARCH_$(VER); \
    25  	done
    26  
    27  	for ARCH in amd64 386; do \
    28  		./upx put dist/upx_windows_$$ARCH/upx.exe /softwares/upx/upx_windows_$$ARCH_$(VER).exe; \
    29  	done
    30  
    31  .PHONY: app test release upload