dev builds use seperate profiles #224

Merged
sarah merged 1 commits from :dev-profiles into master 2019-09-30 18:28:01 +00:00
2 changed files with 14 additions and 3 deletions

View File

@ -56,8 +56,11 @@ func AppEventListener(gcd *gothings.GrandCentralDispatcher, subscribed chan bool
if e.Data[event.Error] == event.AppErrLoaded0 {
// TODO: only an error if other profiles are not loaded
log.Infoln("couldn't load your config file. attempting to create one now")
the.CwtchApp.CreatePeer("alice", the.AppPassword)
if gcd.Version() == "development" {
Review

Can this be overridden at all?

Can this be overridden at all?
Review

CWTCH_FOLDER overrides

CWTCH_FOLDER overrides
the.CwtchApp.CreatePeer("tester", the.AppPassword)
} else {
the.CwtchApp.CreatePeer("alice", the.AppPassword)
}
}
case event.ReloadDone:

10
main.go
View File

@ -57,7 +57,9 @@ func main() {
}
// TESTING
//log.SetLevel(log.LevelDebug)
if buildVer == "" {
log.SetLevel(log.LevelDebug)
}
//log.ExcludeFromPattern("connection/connection")
//log.ExcludeFromPattern("outbound/3dhauthchannel")
//log.AddNothingExceptFilter("event/eventmanager")
@ -74,6 +76,12 @@ func main() {
}
the.CwtchDir = path.Join(usr.HomeDir, ".cwtch")
}
if buildVer == "" && os.Getenv("CWTCH_FOLDER") == "" {
log.Infoln("Development build: using dev directory for dev profiles")
the.CwtchDir = path.Join(the.CwtchDir, "dev")
}
the.ACN = nil
the.Peer = nil
the.IPCBridge = nil