diff --git a/Makefile b/Makefile
deleted file mode 100644
index 398cdc326527abe7b6e47459a84712f148f66609..0000000000000000000000000000000000000000
--- a/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-VERSION=v0.1.0
-
-build:
- go build -ldflags="-X 'main.Version=${VERSION}'"
-
-tar: build
- git archive \
- -o midr-${VERSION}.tar.gz \
- --prefix=midr-${VERSION}/ HEAD
diff --git a/build.yml b/build.yml
index 2be62583e5356e45710c64e272b2ad1def599b20..9123aa080829bc6dd5e19df7d03bb19bd0df988a 100644
--- a/build.yml
+++ b/build.yml
@@ -2,7 +2,6 @@ # this build is meant to be submitted manually
image: alpine/latest
packages:
- rsync
- - make
- go
sources:
@@ -14,13 +13,17 @@
environment:
deploy: builds@gabrielgio.me
target: artifacts.gabrielgio.me/midr/
+ VERSION: 0.1.0
GOPROXY: direct
XZ_OPT: -9
tasks:
- build: |
cd midr
- make tar
+ git archive \
+ -o midr-${VERSION}.tar.gz \
+ --prefix=midr-${VERSION}/ HEAD
+
- deploy: |
cd midr
sshopts="ssh -o StrictHostKeyChecking=no"
diff --git a/manager_test.go b/manager_test.go
deleted file mode 100644
index d0d2e35374ecfa99f4c1c81b47005ad3201410b9..0000000000000000000000000000000000000000
--- a/manager_test.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package main
-
-import (
- "errors"
- "fmt"
- "math/rand"
- "os"
- "strings"
- "testing"
-
- "git.sr.ht/~gabrielgio/midr/yt"
- "github.com/stretchr/testify/assert"
-)
-
-const charset = "0123456789abcdef"
-
-func randomString(length int) string {
- sb := strings.Builder{}
- sb.Grow(length)
- for i := 0; i < length; i++ {
- sb.WriteByte(charset[rand.Intn(len(charset))])
- }
- return sb.String()
-}
-
-func exists(path string) bool {
- _, err := os.Stat(path)
- return !errors.Is(err, os.ErrNotExist)
-}
-
-func TestDownloadProcess(t *testing.T) {
- random := randomString(5)
- tmp := fmt.Sprintf("/tmp/%s", random)
- link := "https://www.youtube.com/watch?v=zGDzdps75ns"
- yt.RunYtDlpProcess(link, tmp)
-
- full_tmp_path := fmt.Sprintf("%s/Small short test video.webm", tmp)
- assert.True(t, exists(full_tmp_path), "it worked?")
-
- e := os.Remove(full_tmp_path)
- if e != nil {
- assert.FailNow(t, "File not removed properly")
- }
-
-}