mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 23:33:34 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			45 lines
		
	
	
		
			991 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			991 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash -e
 | ||
| 
 | ||
| DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 | ||
| . "$DIR/.common.sh"
 | ||
| 
 | ||
| export GOOS=linux
 | ||
| 
 | ||
| # Determine the correct binary file for the architecture given
 | ||
| case ${TARGETPLATFORM:-} in
 | ||
| 	linux/arm64)
 | ||
| 		export GOARCH=arm64
 | ||
| 		;;
 | ||
| 
 | ||
| 	linux/arm/v7)
 | ||
| 		export GOARCH=arm
 | ||
| 		;;
 | ||
| 
 | ||
| 	linux/amd64)
 | ||
| 		export GOARCH=amd64
 | ||
| 		;;
 | ||
| esac
 | ||
| 
 | ||
| echo -e "${BLUE}❯ ${CYAN}Building binaries for ${YELLOW}${GOARCH} (${TARGETPLATFORM:-})${RESET}"
 | ||
| 
 | ||
| # server
 | ||
| go build \
 | ||
| 	-tags 'json1' \
 | ||
| 	-buildvcs=false \
 | ||
| 	-ldflags "-w -s -X main.commit=${BUILD_COMMIT:-notset} -X main.version=${BUILD_VERSION} -X main.sentryDSN=${SENTRY_DSN:-}" \
 | ||
| 	-o "${1:-/dist/server}" \
 | ||
| 	./cmd/server
 | ||
| 
 | ||
| # ipranges
 | ||
| go build \
 | ||
| 	-buildvcs=false \
 | ||
| 	-ldflags "-w -s -X main.commit=${BUILD_COMMIT:-notset} -X main.version=${BUILD_VERSION} -X main.sentryDSN=${SENTRY_DSN:-}" \
 | ||
| 	-o "${2:-/dist/ipranges}" \
 | ||
| 	./cmd/ipranges
 | ||
| 
 | ||
| # test binaries
 | ||
| /dist/server --version
 | ||
| /dist/ipranges --version
 | ||
| 
 | ||
| echo -e "${BLUE}❯ ${CYAN}Build binaries complete${RESET}"
 |