Compare commits
No commits in common. "5f65e4f4bed438ae30ba90ab334e0e0ab9bfdefa" and "03eb4fb389a671c64c35ca486cfe762fef087eab" have entirely different histories.
5f65e4f4be
...
03eb4fb389
|
@ -1,16 +1,6 @@
|
|||
package forgepb
|
||||
|
||||
/*
|
||||
check settings for a particular gopath
|
||||
this provides checks for:
|
||||
|
||||
IsReadOnly() // user can't push commits
|
||||
IsPrivate() // repo can't be published to the pkg.go.dev system
|
||||
DebName() // for 'zookeeper' returns 'zookeeper-go'
|
||||
*/
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
@ -109,24 +99,3 @@ func (all *Repos) IsPrivate(gopath string) bool {
|
|||
// otherwise, assume not private
|
||||
return match.Private
|
||||
}
|
||||
|
||||
// returns the deb package
|
||||
func (all *Repos) DebName(gopath string) string {
|
||||
|
||||
normalBase := filepath.Base(gopath)
|
||||
|
||||
loop := all.SortByPath()
|
||||
for loop.Scan() {
|
||||
r := loop.Repo()
|
||||
if r.GoPath == gopath {
|
||||
// if private is set here, then ok, otherwise
|
||||
// still check if a Directory match exists
|
||||
if r.DebName == "" {
|
||||
return r.DebName
|
||||
} else {
|
||||
return normalBase
|
||||
}
|
||||
}
|
||||
}
|
||||
return normalBase
|
||||
}
|
|
@ -24,7 +24,7 @@ message Repo {
|
|||
string develBranch = 9; // whatever the git 'devel' branch name is
|
||||
string userBranch = 10; // whatever your username branch is
|
||||
|
||||
string debName = 11; // the actual name used with 'apt install' (or distro apt equivalent.
|
||||
string debname = 11; // the actual name used with 'apt install' (or distro apt equivalent.
|
||||
// todo: appeal to everyone to alias 'apt' on rhat, gentoo, arch, etc to alias 'apt install'
|
||||
// so we can make easier instructions for new linux users. KISS
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ func (all *Repos) SampleConfig() {
|
|||
|
||||
new1 = new(Repo)
|
||||
new1.GoPath = "go.wit.com/apps/zookeeper"
|
||||
new1.DebName = "zookeeper-go"
|
||||
new1.Debname = "zookeeper-go"
|
||||
if all.Append(new1) {
|
||||
log.Info("added", new1.GoPath, "ok")
|
||||
} else {
|
||||
|
@ -37,7 +37,7 @@ func (all *Repos) SampleConfig() {
|
|||
|
||||
new1 = new(Repo)
|
||||
new1.GoPath = "go.wit.com/apps/networkQuality"
|
||||
new1.DebName = "networkquality"
|
||||
new1.Debname = "networkquality"
|
||||
new1.ReadOnly = true
|
||||
if all.Append(new1) {
|
||||
log.Info("added", new1.GoPath, "ok")
|
||||
|
|
Loading…
Reference in New Issue