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
import "meow.tf/deb-simple"
import (
"gitea.meow.tf/tyler/deb-simple"
)
func main() {
simple.Start()

View File

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

View File

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

View File

@ -197,7 +197,9 @@ func uploadHandler(w http.ResponseWriter, r *http.Request) {
// Archive old file
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)
continue
}

View File

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