Add release:windows command
This commit is contained in:
parent
26dda5185c
commit
33d410946a
20
magefile.go
20
magefile.go
|
@ -394,15 +394,33 @@ func (Release) Release() {
|
|||
// Creates all directories needed to release vikunja
|
||||
func (Release) Dirs() error {
|
||||
for _, d := range []string{"binaries", "release", "zip"} {
|
||||
if err := os.MkdirAll(RootPath+"/"+DIST+"/"+d, os.ModeDir); err != nil {
|
||||
if err := os.MkdirAll(RootPath+"/"+DIST+"/"+d, 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Builds binaries for windows
|
||||
func (Release) Windows() {
|
||||
checkAndInstallGoTool("xgo", "src.techknowlogick.com/xgo")
|
||||
runAndStreamOutput("xgo",
|
||||
"-dest", RootPath+"/"+DIST+"/binaries",
|
||||
"-tags", "'netgo "+Tags+"'",
|
||||
"-ldflags", "'-linkmode external -extldflags \"-static\" "+Ldflags+"'",
|
||||
"-targets", "'windows/*'",
|
||||
"-out", Executable+"-"+Version,
|
||||
".")
|
||||
if os.Getenv("DRONE_WORKSPACE") != "" {
|
||||
//os.Rename("/build/")
|
||||
}
|
||||
/*
|
||||
xgo -dest $(DIST)/binaries -tags 'netgo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out vikunja-$(VERSION) .
|
||||
|
||||
ifneq ($(DRONE_WORKSPACE),'')
|
||||
mv /build/* $(DIST)/binaries
|
||||
endif
|
||||
*/
|
||||
}
|
||||
|
||||
func (Release) Linux() {
|
||||
|
|
Loading…
Reference in New Issue