this should do
This commit is contained in:
		
							parent
							
								
									76f4cc6e2e
								
							
						
					
					
						commit
						384cd4f483
					
				@ -1,7 +1,9 @@
 | 
			
		||||
local pipeline(arch, os) = {
 | 
			
		||||
  kind: "pipeline",
 | 
			
		||||
  name: "build",
 | 
			
		||||
  type: "docker",
 | 
			
		||||
  name: "build go",
 | 
			
		||||
  steps: [{
 | 
			
		||||
      name: "build " + os + "/" + arch,
 | 
			
		||||
      image: "golang:1.15.6-alpine3.12",
 | 
			
		||||
      environment: {
 | 
			
		||||
        "GOOS": os,
 | 
			
		||||
@ -9,8 +11,7 @@ local pipeline(arch, os) = {
 | 
			
		||||
        "CGO_ENABLED": "0",
 | 
			
		||||
      },
 | 
			
		||||
      commands: [
 | 
			
		||||
        // 'go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/' + os + "/" + arch + "/ubnt-freifunk-map-api .",
 | 
			
		||||
        'go build -o release/' + os + "/" + arch + "/ubnt-freifunk-map-api .",
 | 
			
		||||
        'go build -ldflags "-X main.version=${DRONE_TAG##v}" -o release/' + os + "/" + arch + "/ubnt-freifunk-map-api .",
 | 
			
		||||
        "tar -cvzf release/ubnt-freifunk-map-api_"+ os + "/" + arch + ".tar.gz -C release/" + os + "/" + arch + " ubnt-freifunk-map-api" 
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
@ -18,10 +19,9 @@ local pipeline(arch, os) = {
 | 
			
		||||
};
 | 
			
		||||
[
 | 
			
		||||
  pipeline("linux", "amd64"),
 | 
			
		||||
  pipeline("linux", "arm64"),
 | 
			
		||||
  pipeline("darwin", "amd64"),
 | 
			
		||||
  pipeline("darwin", "arm64"),
 | 
			
		||||
  pipeline("windows", "amd64"),
 | 
			
		||||
  pipeline("windows", "arm64"),
 | 
			
		||||
]
 | 
			
		||||
  // pipeline("linux", "arm64"),
 | 
			
		||||
  // pipeline("darwin", "amd64"),
 | 
			
		||||
  // pipeline("darwin", "arm64"),
 | 
			
		||||
  // pipeline("windows", "amd64"),
 | 
			
		||||
  // pipeline("windows", "arm64"),
 | 
			
		||||
// ]
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user