mirror of
				https://github.com/moby/moby.git
				synced 2022-11-09 12:21:53 -05:00 
			
		
		
		
	Add windows/(386,amd64) to cross platforms list
Edited make scripts to append .exe to windows binary Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
This commit is contained in:
		
							parent
							
								
									5a38680bd2
								
							
						
					
					
						commit
						b7703a992e
					
				
					 3 changed files with 11 additions and 5 deletions
				
			
		
							
								
								
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
.vagrant*
 | 
			
		||||
bin
 | 
			
		||||
docker/docker
 | 
			
		||||
*.exe
 | 
			
		||||
.*.swp
 | 
			
		||||
a.out
 | 
			
		||||
*.orig
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,8 @@ RUN	cd /usr/local/go/src && ./make.bash --no-clean 2>&1
 | 
			
		|||
ENV	DOCKER_CROSSPLATFORMS	\
 | 
			
		||||
	linux/386 linux/arm \
 | 
			
		||||
	darwin/amd64 darwin/386 \
 | 
			
		||||
	freebsd/amd64 freebsd/386 freebsd/arm
 | 
			
		||||
	freebsd/amd64 freebsd/386 freebsd/arm \
 | 
			
		||||
	windows/amd64 windows/386
 | 
			
		||||
# (set an explicit GOARM of 5 for maximum compatibility)
 | 
			
		||||
ENV	GOARM	5
 | 
			
		||||
RUN	cd /usr/local/go/src && bash -xc 'for platform in $DOCKER_CROSSPLATFORMS; do GOOS=${platform%/*} GOARCH=${platform##*/} ./make.bash --no-clean 2>&1; done'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -2,16 +2,20 @@
 | 
			
		|||
set -e
 | 
			
		||||
 | 
			
		||||
DEST=$1
 | 
			
		||||
BINARY_NAME="docker-$VERSION"
 | 
			
		||||
if [ "$(go env GOOS)" = 'windows' ]; then
 | 
			
		||||
	BINARY_NAME+='.exe'
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
go build \
 | 
			
		||||
	-o "$DEST/docker-$VERSION" \
 | 
			
		||||
	-o "$DEST/$BINARY_NAME" \
 | 
			
		||||
	"${BUILDFLAGS[@]}" \
 | 
			
		||||
	-ldflags "
 | 
			
		||||
		$LDFLAGS
 | 
			
		||||
		$LDFLAGS_STATIC_DOCKER
 | 
			
		||||
	" \
 | 
			
		||||
	./docker
 | 
			
		||||
echo "Created binary: $DEST/docker-$VERSION"
 | 
			
		||||
ln -sf "docker-$VERSION" "$DEST/docker"
 | 
			
		||||
echo "Created binary: $DEST/$BINARY_NAME"
 | 
			
		||||
ln -sf "$BINARY_NAME" "$DEST/docker"
 | 
			
		||||
 | 
			
		||||
hash_files "$DEST/docker-$VERSION"
 | 
			
		||||
hash_files "$DEST/$BINARY_NAME"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue