Skip to content

Commit

Permalink
Tweaks to setup, actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
gmemstr committed Mar 19, 2022
1 parent 22eb792 commit f09fa7d
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dev-docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/dev-docker-build-push.yml'
branches-ignore:
- 'master'

Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.github/workflows/docker-build-push.yml'
branches:
- 'master'

Expand Down
17 changes: 17 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -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
)
27 changes: 27 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
8 changes: 4 additions & 4 deletions setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f09fa7d

Please sign in to comment.