fix build
This commit is contained in:
parent
23711b4d38
commit
100fed12c4
6
Makefile
6
Makefile
|
@ -82,12 +82,6 @@ curl-gitpull-helloworld:
|
||||||
curl-gitpull-basicworld:
|
curl-gitpull-basicworld:
|
||||||
curl --silent http://localhost:9419/gitpull?repo=go.wit.com/apps/basicworld
|
curl --silent http://localhost:9419/gitpull?repo=go.wit.com/apps/basicworld
|
||||||
|
|
||||||
curl-release-helloworld:
|
|
||||||
curl --silent http://localhost:9419/release?repo=go.wit.com/apps/helloworld
|
|
||||||
|
|
||||||
curl-release-gowit:
|
|
||||||
curl --silent http://localhost:9419/release?repo=go.wit.com/lib/gui/gowit
|
|
||||||
|
|
||||||
file-for-go.wit.com:
|
file-for-go.wit.com:
|
||||||
curl --silent http://localhost:9419/goweblist?readonly=true
|
curl --silent http://localhost:9419/goweblist?readonly=true
|
||||||
curl --silent http://localhost:9419/goweblist?readonly=true |sort > ~/go.wit.com.versions
|
curl --silent http://localhost:9419/goweblist?readonly=true |sort > ~/go.wit.com.versions
|
||||||
|
|
5
http.go
5
http.go
|
@ -47,11 +47,6 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if route == "/release" {
|
|
||||||
simpleRelease(w, r)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if route == "/list" {
|
if route == "/list" {
|
||||||
readonly := r.URL.Query().Get("readonly")
|
readonly := r.URL.Query().Get("readonly")
|
||||||
onlydirty := r.URL.Query().Get("onlydirty")
|
onlydirty := r.URL.Query().Get("onlydirty")
|
||||||
|
|
25
repoview.go
25
repoview.go
|
@ -1,11 +1,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
|
||||||
|
|
||||||
"go.wit.com/lib/gadgets"
|
"go.wit.com/lib/gadgets"
|
||||||
"go.wit.com/lib/gui/repolist"
|
"go.wit.com/lib/gui/repolist"
|
||||||
"go.wit.com/lib/gui/shell"
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
|
||||||
"go.wit.com/gui"
|
"go.wit.com/gui"
|
||||||
|
@ -102,15 +99,17 @@ func (r *repoWindow) repoMenu() *gui.Node {
|
||||||
})
|
})
|
||||||
*/
|
*/
|
||||||
|
|
||||||
box2.NewButton("merge it all", func() {
|
box2.NewButton("merge it all (old)", func() {
|
||||||
r.Disable()
|
/*
|
||||||
if !r.mergeAllUserToDevel() {
|
r.Disable()
|
||||||
return
|
if !r.mergeAllUserToDevel() {
|
||||||
}
|
return
|
||||||
if !r.mergeAllDevelToMain() {
|
}
|
||||||
return
|
if !r.mergeAllDevelToMain() {
|
||||||
}
|
return
|
||||||
r.Enable()
|
}
|
||||||
|
r.Enable()
|
||||||
|
*/
|
||||||
})
|
})
|
||||||
|
|
||||||
box2.NewButton("show apps", func() {
|
box2.NewButton("show apps", func() {
|
||||||
|
@ -158,6 +157,7 @@ func (r *repoWindow) repoMenu() *gui.Node {
|
||||||
return box2
|
return box2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
func (r *repoWindow) mergeAllDevelToMain() bool {
|
func (r *repoWindow) mergeAllDevelToMain() bool {
|
||||||
log.Info("merge all here")
|
log.Info("merge all here")
|
||||||
loop := me.repos.View.ReposSortByName()
|
loop := me.repos.View.ReposSortByName()
|
||||||
|
@ -226,3 +226,4 @@ func (r *repoWindow) mergeAllUserToDevel() bool {
|
||||||
log.Warn("EVERYTHING WORKED")
|
log.Warn("EVERYTHING WORKED")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
|
@ -1,58 +0,0 @@
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"net/http"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"go.wit.com/log"
|
|
||||||
)
|
|
||||||
|
|
||||||
// attempts a simple release
|
|
||||||
// merge user branch -> devel; then;
|
|
||||||
// git push
|
|
||||||
// merge devel branch -> master; then;
|
|
||||||
// git push
|
|
||||||
|
|
||||||
// increments the minor version by 1; then;
|
|
||||||
// git push --tags
|
|
||||||
|
|
||||||
func simpleRelease(w http.ResponseWriter, r *http.Request) {
|
|
||||||
repoName := r.URL.Query().Get("repo")
|
|
||||||
if repoName == "" {
|
|
||||||
log.Info("url did not have repo variable")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
// git pull (or go-clone of it doesn't exist)
|
|
||||||
repo := me.repos.View.FindByName(repoName)
|
|
||||||
if repo == nil {
|
|
||||||
log.Info("repo unknown: " + repoName)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
header := repo.StandardHeader()
|
|
||||||
if repo.CheckDirty() {
|
|
||||||
log.Info(header + "skip dirty repo")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if repo.State() == "PERFECT" {
|
|
||||||
log.Info(header + "already released")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
curName := repo.Status.GetCurrentBranchName()
|
|
||||||
mName := repo.Status.GetMasterBranchName()
|
|
||||||
if curName != mName {
|
|
||||||
// s := log.Sprintf("\trepo is not working from main branch", curName, "!=", mName)
|
|
||||||
s := fmt.Sprint("repo is not working from main branch ", curName, " != ", mName)
|
|
||||||
log.Info(s)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
cmd := []string{"git", "pull", "-v"}
|
|
||||||
log.Info(header + strings.Join(cmd, " "))
|
|
||||||
if repo.Status.MergeUserToDevel() {
|
|
||||||
log.Info("THINGS SEEM OK MergeUserToDevel() returned true.")
|
|
||||||
} else {
|
|
||||||
log.Info("THINGS FAILED MergeUserToDevel() returned false")
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
Loading…
Reference in New Issue