Remove more debug
This commit is contained in:
parent
d3278c8394
commit
463c1751a9
|
@ -119,8 +119,6 @@ func createRelease(config Conf, distro, arch string) error {
|
||||||
for _, file := range dirList {
|
for _, file := range dirList {
|
||||||
filePath := filepath.Join(config.DistPath(distro), basePath, file.Name())
|
filePath := filepath.Join(config.DistPath(distro), basePath, file.Name())
|
||||||
|
|
||||||
log.Println("File path:", filePath)
|
|
||||||
|
|
||||||
fileLocalPath := filepath.Join(basePath, file.Name())
|
fileLocalPath := filepath.Join(basePath, file.Name())
|
||||||
|
|
||||||
fileLocalPath = strings.Replace(fileLocalPath, "\\", "/", -1)
|
fileLocalPath = strings.Replace(fileLocalPath, "\\", "/", -1)
|
||||||
|
@ -128,7 +126,7 @@ func createRelease(config Conf, distro, arch string) error {
|
||||||
f, err := os.Open(filePath)
|
f, err := os.Open(filePath)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("error opening source file: ", err)
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
var size int64 = file.Size()
|
var size int64 = file.Size()
|
||||||
|
|
|
@ -15,7 +15,6 @@ import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
"log"
|
|
||||||
"github.com/blang/semver"
|
"github.com/blang/semver"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -118,7 +117,6 @@ func scanRecursive(path string, m map[string]*PackageFile) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func newPackageFile(path, name string) (*PackageFile, error) {
|
func newPackageFile(path, name string) (*PackageFile, error) {
|
||||||
log.Println("New package from", path, name)
|
|
||||||
p := &PackageFile{
|
p := &PackageFile{
|
||||||
Name: name,
|
Name: name,
|
||||||
Path: filepath.Join(path, name),
|
Path: filepath.Join(path, name),
|
||||||
|
|
|
@ -102,19 +102,7 @@ func Start() {
|
||||||
for _, dist := range parsedConfig.DistroNames {
|
for _, dist := range parsedConfig.DistroNames {
|
||||||
distro := &Distro{Name: dist, Architectures: make(map[string]map[string]*PackageFile)}
|
distro := &Distro{Name: dist, Architectures: make(map[string]map[string]*PackageFile)}
|
||||||
|
|
||||||
for _, arch := range parsedConfig.SupportArch {
|
go scanInitialPackages(parsedConfig, distro)
|
||||||
files, err := buildPackageList(parsedConfig, dist, arch)
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalln("Unable to load packages:", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
distro.Architectures[arch] = files
|
|
||||||
|
|
||||||
log.Println("Generating packages file for", dist, arch)
|
|
||||||
createPackagesCached(parsedConfig, dist, arch, files)
|
|
||||||
createRelease(parsedConfig, dist, arch)
|
|
||||||
}
|
|
||||||
|
|
||||||
distros[dist] = distro
|
distros[dist] = distro
|
||||||
}
|
}
|
||||||
|
@ -132,6 +120,22 @@ func Start() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func scanInitialPackages(config Conf, dist *Distro) {
|
||||||
|
for _, arch := range config.SupportArch {
|
||||||
|
files, err := buildPackageList(config, dist.Name, arch)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalln("Unable to load packages:", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
dist.Architectures[arch] = files
|
||||||
|
|
||||||
|
log.Println("Generating packages file for", dist.Name, arch)
|
||||||
|
createPackagesCached(config, dist.Name, arch, files)
|
||||||
|
createRelease(config, dist.Name, arch)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func setupPgp(config Conf) error {
|
func setupPgp(config Conf) error {
|
||||||
if config.PGPSecretKey == "" {
|
if config.PGPSecretKey == "" {
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue