Skip to content

Commit 161853b

Browse files
authored
Merge pull request #95 from mkumatag/windows_support
Add windows support
2 parents 8b140e1 + 02f4432 commit 161853b

File tree

6 files changed

+59
-2
lines changed

6 files changed

+59
-2
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
git fetch --tags --force --prune
5555
VERSION=$(git describe --tags --dirty)
5656
STATIC_FLAG='-w -extldflags "-static"'
57-
for platform in darwin/amd64 linux/amd64 linux/ppc64le
57+
for platform in darwin/amd64 linux/amd64 linux/ppc64le windows/amd64
5858
do
5959
os_name=$(echo "$platform" | cut -d "/" -f 1)
6060
arch=$(echo "$platform" | cut -d "/" -f 2)

.github/workflows/release.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
mkdir -p bin
3131
VERSION=${{ steps.get_version.outputs.VERSION }}
3232
STATIC_FLAG='-w -extldflags "-static"'
33-
for platform in darwin/amd64 linux/amd64 linux/ppc64le
33+
for platform in darwin/amd64 linux/amd64 linux/ppc64le windows/amd64
3434
do
3535
os_name=$(echo "$platform" | cut -d "/" -f 1)
3636
arch=$(echo "$platform" | cut -d "/" -f 2)
@@ -110,6 +110,26 @@ jobs:
110110
asset_name: pvsadm-darwin-amd64.tar.gz
111111
asset_content_type: application/tar+gzip
112112

113+
- name: Upload Windows - amd64
114+
uses: actions/upload-release-asset@v1
115+
env:
116+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
with:
118+
upload_url: ${{ steps.create_release.outputs.upload_url }}
119+
asset_path: ./bin/windows-amd64/pvsadm
120+
asset_name: pvsadm-windows-amd64
121+
asset_content_type: application/octet-stream
122+
123+
- name: Upload Windows - amd64 - tar.gz
124+
uses: actions/upload-release-asset@v1
125+
env:
126+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
127+
with:
128+
upload_url: ${{ steps.create_release.outputs.upload_url }}
129+
asset_path: pvsadm-windows-amd64.tar.gz
130+
asset_name: pvsadm-windows-amd64.tar.gz
131+
asset_content_type: application/tar+gzip
132+
113133
- name: Upload all
114134
uses: actions/upload-release-asset@v1
115135
env:

cmd/image/qcow2ova/prep/chroot.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//+build !windows
2+
13
package prep
24

35
import (
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package prep
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
func Chroot(path string) error {
8+
return fmt.Errorf("Not supported on windows platform")
9+
}
10+
11+
func ExitChroot() error {
12+
return fmt.Errorf("Not supported on windows platform")
13+
}

cmd/image/qcow2ova/validate/diskspace/diskspace.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// +build !windows
2+
13
package diskspace
24

35
import (
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package diskspace
2+
3+
import (
4+
"fmt"
5+
)
6+
7+
type Rule struct {
8+
}
9+
10+
func (p *Rule) String() string {
11+
return "diskspace"
12+
}
13+
14+
func (p *Rule) Verify() error {
15+
return fmt.Errorf("Not supported on Windows platform")
16+
}
17+
18+
func (p *Rule) Hint() string {
19+
return "Please retry on linux/ppc64le platform"
20+
}

0 commit comments

Comments
 (0)