diff options
author | 2018-01-13 13:23:39 -0800 | |
---|---|---|
committer | 2018-01-17 13:42:24 -0800 | |
commit | 8e0f32eb5421d71846700ffe4f11d2958a33f1b1 (patch) | |
tree | 33603cfe7125d0b142565b590afdfd9ea4420919 /platforms_defaults.go | |
parent | feat(main): implement []string flag valuer (diff) | |
download | bakelite-8e0f32eb5421d71846700ffe4f11d2958a33f1b1.tar.xz |
feat(main): support modifying built platformsv0.1.0
Bakelite now accepts a platform modification string vita the -platform
flag. This string format for adding and removing the built platforms,
including removing the default platforms entirely. It is processed left
to right.
bakelite -platform '-windows +linux/s390x' [packages]
Would now build [packages] for all of the default platforms, except for
Windows, and also build for the linux/s390x platform.
bakelite -platform '- +linux +darwin' [packages]
Would now build [packages] for the default platforms of only the Linux
and Darwin operating systems.
The platform modification string is parsed and turned into calls to
a structure following the builder pattern.
As the user can now modify the built platforms, Bakelite now exits with
a non-zero exit code if any of the platforms fail to build.
Change-Id: Iade51e17bbfda4e916394343a5f8cb3208f2b160
Diffstat (limited to 'platforms_defaults.go')
-rw-r--r-- | platforms_defaults.go | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/platforms_defaults.go b/platforms_defaults.go new file mode 100644 index 0000000..9219071 --- /dev/null +++ b/platforms_defaults.go @@ -0,0 +1,75 @@ +package main + +func defaultDarwin() []Platform { + return []Platform{ + {OS_DARWIN, ARCH_386}, + {OS_DARWIN, ARCH_AMD64}, + //{OS_DARWIN, ARCH_ARM}, + //{OS_DARWIN, ARCH_ARM64}, + } +} + +func defaultDragonfly() []Platform { + return []Platform{ + {OS_DRAGONFLY, ARCH_AMD64}, + } +} + +func defaultFreeBSD() []Platform { + return []Platform{ + {OS_FREEBSD, ARCH_386}, + {OS_FREEBSD, ARCH_AMD64}, + //{OS_FREEBSD, ARCH_ARM}, + } +} + +func defaultLinux() []Platform { + return []Platform{ + {OS_LINUX, ARCH_386}, + {OS_LINUX, ARCH_AMD64}, + //{OS_LINUX, ARCH_ARM}, + //{OS_LINUX, ARCH_ARM64}, + {OS_LINUX, ARCH_PPC64}, + {OS_LINUX, ARCH_PPC64LE}, + {OS_LINUX, ARCH_MIPS}, + {OS_LINUX, ARCH_MIPSLE}, + {OS_LINUX, ARCH_MIPS64}, + {OS_LINUX, ARCH_MIPS64LE}, + } +} + +func defaultNetBSD() []Platform { + return []Platform{ + {OS_NETBSD, ARCH_386}, + {OS_NETBSD, ARCH_AMD64}, + //{OS_NETBSD, ARCH_ARM}, + } +} + +func defaultOpenBSD() []Platform { + return []Platform{ + {OS_OPENBSD, ARCH_386}, + {OS_OPENBSD, ARCH_AMD64}, + //{OS_OPENBSD, ARCH_ARM}, + } +} + +func defaultPlan9() []Platform { + return []Platform{ + {OS_PLAN9, ARCH_386}, + {OS_PLAN9, ARCH_AMD64}, + } +} + +func defaultSolaris() []Platform { + return []Platform{ + {OS_SOLARIS, ARCH_AMD64}, + } +} + +func defaultWindows() []Platform { + return []Platform{ + {OS_WINDOWS, ARCH_386}, + {OS_WINDOWS, ARCH_AMD64}, + } +} |