Fix directory structure for drone
the build failed Details

This commit is contained in:
Tyler 2018-10-14 04:14:17 -04:00
parent 96371be97e
commit 49f1b9312d
13 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,8 @@
package main package main
import "meow.tf/deb-simple" import (
"gitea.meow.tf/tyler/deb-simple"
)
func main() { func main() {
simple.Start() simple.Start()

View File

@ -12,7 +12,7 @@ import (
"encoding/hex" "encoding/hex"
"golang.org/x/crypto/openpgp" "golang.org/x/crypto/openpgp"
"time" "time"
"meow.tf/deb-simple/deb/release" "gitea.meow.tf/deb-simple/deb/release"
"path" "path"
) )

View File

@ -17,6 +17,7 @@ type HttpConf struct {
SSL bool `ini:"ssl"` SSL bool `ini:"ssl"`
SSLCert string `ini:"cert"` SSLCert string `ini:"cert"`
SSLKey string `ini:"key"` SSLKey string `ini:"key"`
EnableVhosts bool `ini:"vhosts"`
} }
type RepoConf struct { type RepoConf struct {

View File

@ -197,7 +197,9 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
// Archive old file // Archive old file
log.Println("Replacing", p.Name, "with", f.Name) log.Println("Replacing", p.Name, "with", f.Name)
if err := os.Remove(path.Join(conf.Repo.Root, p.Path)); err != nil { oldPath := path.Join(conf.Repo.Root, p.Path)
if err := os.Remove(oldPath); err != nil && !os.IsNotExist(err) {
httpErrorf(w, "Unable to remove old package: %s", err) httpErrorf(w, "Unable to remove old package: %s", err)
continue continue
} }

View File

@ -16,7 +16,7 @@ import (
"crypto/sha256" "crypto/sha256"
"github.com/blang/semver" "github.com/blang/semver"
"encoding/json" "encoding/json"
"meow.tf/deb-simple/deb/archive" "gitea.meow.tf/deb-simple/deb/archive"
"path" "path"
) )