Fix directory structure for drone
the build failed
Details
the build failed
Details
This commit is contained in:
parent
96371be97e
commit
49f1b9312d
4
main.go
4
main.go
|
@ -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()
|
||||||
|
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
|
@ -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 {
|
|
@ -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
|
||||||
}
|
}
|
|
@ -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"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue