From f09fa7dc18ea4a7086953071903167d087405505 Mon Sep 17 00:00:00 2001 From: Gabriel Simmer Date: Sat, 19 Mar 2022 12:59:56 +0000 Subject: [PATCH] Tweaks to setup, actions. --- .github/workflows/dev-docker-build-push.yml | 3 +++ .github/workflows/docker-build-push.yml | 3 +++ go.mod | 17 +++++++++++++ go.sum | 27 +++++++++++++++++++++ setup.go | 8 +++--- 5 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 go.mod create mode 100644 go.sum diff --git a/.github/workflows/dev-docker-build-push.yml b/.github/workflows/dev-docker-build-push.yml index dc6ae8c..b4d0470 100644 --- a/.github/workflows/dev-docker-build-push.yml +++ b/.github/workflows/dev-docker-build-push.yml @@ -4,6 +4,9 @@ on: push: paths: - '**.go' + - 'go.mod' + - 'go.sum' + - '.github/workflows/dev-docker-build-push.yml' branches-ignore: - 'master' diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index bee1e33..c47e63f 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -4,6 +4,9 @@ on: push: paths: - '**.go' + - 'go.mod' + - 'go.sum' + - '.github/workflows/docker-build-push.yml' branches: - 'master' diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..b259822 --- /dev/null +++ b/go.mod @@ -0,0 +1,17 @@ +module github.com/gmemstr/pogo + +go 1.17 + +require ( + github.com/fsnotify/fsnotify v1.5.1 + github.com/google/go-github v17.0.0+incompatible + github.com/gorilla/feeds v1.0.0 + github.com/gorilla/mux v1.8.0 + github.com/mattn/go-sqlite3 v1.14.12 + golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd +) + +require ( + github.com/google/go-querystring v1.1.0 // indirect + golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..4e19524 --- /dev/null +++ b/go.sum @@ -0,0 +1,27 @@ +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github v17.0.0+incompatible h1:N0LgJ1j65A7kfXrZnUDaYCs/Sf4rEjNlfyDHW9dolSY= +github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= +github.com/gorilla/feeds v1.0.0 h1:EbkEvaYf+PXhYNHS20heBG7Rl2X6Zy8l11ZBWAHkWqE= +github.com/gorilla/feeds v1.0.0/go.mod h1:Nk0jZrvPFZX1OBe5NPiddPw7CfwF6Q9eqzaBbaightA= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/mattn/go-sqlite3 v1.14.12 h1:TJ1bhYJPV44phC+IMu1u2K/i5RriLTPe+yc68XDJ1Z0= +github.com/mattn/go-sqlite3 v1.14.12/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd h1:XcWmESyNjXJMLahc3mqVQJcgSTDxFxhETVlfk9uGc38= +golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf h1:Fm4IcnUL803i92qDlmB0obyHmosDrxZWxJL3gIeNqOw= +golang.org/x/sys v0.0.0-20220317061510-51cd9980dadf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/setup.go b/setup.go index db1ec62..e6b9638 100644 --- a/setup.go +++ b/setup.go @@ -63,24 +63,24 @@ func GetWebAssets() { for i := 0; i < len(res.Assets); i++ { if res.Assets[i].GetName() == "webassets.zip" { download := res.Assets[i] - fmt.Println("Release found: %v", download.GetBrowserDownloadURL()) + fmt.Printf("Release found: %v\n", download.GetBrowserDownloadURL()) tmpfile, err := os.Create(download.GetName()) if err != nil { - fmt.Println("Problem creating webassets file! %v", err) + fmt.Printf("Problem creating webassets file! %v\n", err) } var j io.Reader = (*os.File)(tmpfile) defer tmpfile.Close() j, s, err := client.DownloadReleaseAsset(ctx, "gmemstr", "pogo-vue", download.GetID()) if err != nil { - fmt.Println("Problem downloading webassets! %v", err) + fmt.Printf("Problem downloading webassets! %v\n", err) } if j == nil { resp, err := http.Get(s) defer resp.Body.Close() _, err = io.Copy(tmpfile, resp.Body) if err != nil { - fmt.Println("Problem creating webassets file! %v", err) + fmt.Printf("Problem creating webassets file! %v\n", err) } fmt.Println("Download complete\nUnzipping") err = Unzip(download.GetName(), "assets/web")