use gomod support w/ xgo (#14836)
This commit is contained in:
		
					parent
					
						
							
								a4148c0f12
							
						
					
				
			
			
				commit
				
					
						d801a158c5
					
				
			
		
					 2 changed files with 12 additions and 6 deletions
				
			
		| 
						 | 
					@ -480,6 +480,9 @@ platform:
 | 
				
			||||||
  os: linux
 | 
					  os: linux
 | 
				
			||||||
  arch: amd64
 | 
					  arch: amd64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					workspace:
 | 
				
			||||||
 | 
					  path: /source
 | 
				
			||||||
 | 
					
 | 
				
			||||||
trigger:
 | 
					trigger:
 | 
				
			||||||
  branch:
 | 
					  branch:
 | 
				
			||||||
    - master
 | 
					    - master
 | 
				
			||||||
| 
						 | 
					@ -574,6 +577,9 @@ platform:
 | 
				
			||||||
  os: linux
 | 
					  os: linux
 | 
				
			||||||
  arch: amd64
 | 
					  arch: amd64
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					workspace:
 | 
				
			||||||
 | 
					  path: /source
 | 
				
			||||||
 | 
					
 | 
				
			||||||
trigger:
 | 
					trigger:
 | 
				
			||||||
  event:
 | 
					  event:
 | 
				
			||||||
    - tag
 | 
					    - tag
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										12
									
								
								Makefile
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								Makefile
									
										
									
									
									
								
							| 
						 | 
					@ -574,9 +574,9 @@ $(DIST_DIRS):
 | 
				
			||||||
.PHONY: release-windows
 | 
					.PHONY: release-windows
 | 
				
			||||||
release-windows: | $(DIST_DIRS)
 | 
					release-windows: | $(DIST_DIRS)
 | 
				
			||||||
	@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
 | 
							$(GO) install src.techknowlogick.com/xgo@latest; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
 | 
						CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) .
 | 
				
			||||||
ifeq ($(CI),drone)
 | 
					ifeq ($(CI),drone)
 | 
				
			||||||
	cp /build/* $(DIST)/binaries
 | 
						cp /build/* $(DIST)/binaries
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					@ -584,9 +584,9 @@ endif
 | 
				
			||||||
.PHONY: release-linux
 | 
					.PHONY: release-linux
 | 
				
			||||||
release-linux: | $(DIST_DIRS)
 | 
					release-linux: | $(DIST_DIRS)
 | 
				
			||||||
	@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
 | 
							$(GO) install src.techknowlogick.com/xgo@latest; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
 | 
						CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) .
 | 
				
			||||||
ifeq ($(CI),drone)
 | 
					ifeq ($(CI),drone)
 | 
				
			||||||
	cp /build/* $(DIST)/binaries
 | 
						cp /build/* $(DIST)/binaries
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					@ -594,9 +594,9 @@ endif
 | 
				
			||||||
.PHONY: release-darwin
 | 
					.PHONY: release-darwin
 | 
				
			||||||
release-darwin: | $(DIST_DIRS)
 | 
					release-darwin: | $(DIST_DIRS)
 | 
				
			||||||
	@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
						@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
 | 
				
			||||||
		GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \
 | 
							$(GO) install src.techknowlogick.com/xgo@latest; \
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64' -out gitea-$(VERSION) .
 | 
						CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64' -out gitea-$(VERSION) .
 | 
				
			||||||
ifeq ($(CI),drone)
 | 
					ifeq ($(CI),drone)
 | 
				
			||||||
	cp /build/* $(DIST)/binaries
 | 
						cp /build/* $(DIST)/binaries
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue