add support to override platform

Signed-off-by: Casey Lee <[email protected]>
This commit is contained in:
Casey Lee committed 2020-02-20 21:06:15 -05:00
1 parent e4ee2ddab7
commit 543501a36a
8 files changed
+59 -37

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
package cmd
import (
"strings"
)
func (i *Input) newPlatforms() map[string]string {
platforms := map[string]string{
"ubuntu-latest": "ubuntu:18.04",
"ubuntu-18.04": "ubuntu:18.04",
"ubuntu-16.04": "ubuntu:16.04",
"windows-latest": "",
"windows-2019": "",
"macos-latest": "",
"macos-10.15": "",
}
for _, p := range i.platforms {
pParts := strings.Split(p, "=")
if len(pParts) == 2 {
platforms[pParts[0]] = pParts[1]
}
}
return platforms
}