This repository was archived by the owner on Jan 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -28,18 +28,15 @@ if ($env:BINARY_NAME -ne "") {
28
28
$BINARY = (Get-Item $env: PACKAGE ).BaseName + " .exe"
29
29
}
30
30
31
- go.exe build - o " binary-output/$BINARY " $env: PACKAGE
32
- if ($LastExitCode -ne 0 ) {
33
- exit $LastExitCode
31
+ $binaryDir = " $PWD \binary-output"
32
+
33
+ # work around https://github.com/golang/go/issues/27515
34
+ $linkType = (get-item $binaryDir ).LinkType
35
+ if ($linkType -ne " " ) {
36
+ $binaryDir = (get-item $binaryDir ).Target
34
37
}
35
38
36
- if ($BINARY -eq " winc-network" ) {
37
- gcc.exe - c " repo\network\firewall\dll\firewall.c" - o " $env: TEMP \firewall.o"
38
- if ($LastExitCode -ne 0 ) {
39
- exit $LastExitCode
40
- }
41
- gcc.exe - shared - o " binary-output\firewall.dll" " $env: TEMP \firewall.o" - lole32 - loleaut32
42
- if ($LastExitCode -ne 0 ) {
43
- exit $LastExitCode
44
- }
39
+ go.exe build - o " $binaryDir \$BINARY " $env: PACKAGE
40
+ if ($LastExitCode -ne 0 ) {
41
+ exit $LastExitCode
45
42
}
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ go.exe version
6
6
$env: GOPATH = $PWD
7
7
$binaryDir = " $PWD \groot-binary"
8
8
9
+ # work around https://github.com/golang/go/issues/27515
10
+ $linkType = (get-item $binaryDir ).LinkType
11
+ if ($linkType -ne " " ) {
12
+ $binaryDir = (get-item $binaryDir ).Target
13
+ }
14
+
9
15
pushd src\code.cloudfoundry.org\groot- windows
10
16
go build - o " $binaryDir \groot.exe" main.go
11
17
if ($LastExitCode -ne 0 ) {
Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ go.exe version
6
6
$env: GOPATH = $PWD
7
7
$binaryDir = " $PWD \winc-network-binary"
8
8
9
+ # work around https://github.com/golang/go/issues/27515
10
+ $linkType = (get-item $binaryDir ).LinkType
11
+ if ($linkType -ne " " ) {
12
+ $binaryDir = (get-item $binaryDir ).Target
13
+ }
14
+
9
15
pushd src\code.cloudfoundry.org\winc
10
16
if ($env: WINDOWS_VERSION -eq " 1709" ) {
11
17
go build - o " $binaryDir \winc-network.exe" .\cmd\winc- network
You can’t perform that action at this time.
0 commit comments