Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
Miachol committed Oct 22, 2020
1 parent 18ec8cb commit 5d9bea2
Show file tree
Hide file tree
Showing 40 changed files with 156 additions and 115 deletions.
47 changes: 47 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod download
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: 32-bit #i386
amd64: 64-bit #x86_64
format: tar.gz
files:
#- LICENSE.md
#- CHANGELOG.md
#- README.md
#- test_data/*
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
release:
github:
owner: clindet
name: bget
# You can change the name of the release.
# Default is `{{.Tag}}`
# name_template: "latest"

project_name: bget
6 changes: 3 additions & 3 deletions _examples/bget_url.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ bget url ${urls} -t 3 -o /tmp/download -g wget --resume
bget url -l /tmp/urls.list -o /tmp/download -f -t 3

bget url Miachol/github_demo --github
bget url PapenfussLab/gridss openanno/bget --with-github-assets -t 5 --github
bget url PapenfussLab/gridss openanno/bget --only-github-assets -t 5 --github
bget url PapenfussLab/gridss openanno/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github
bget url PapenfussLab/gridss clindet/bget --with-github-assets -t 5 --github
bget url PapenfussLab/gridss clindet/bget --only-github-assets -t 5 --github
bget url PapenfussLab/gridss clindet/bget --with-github-assets --with-assets-versions v2.7.2,v0.1.3 -t 5 --github

bget --clean

2 changes: 1 addition & 1 deletion _meta/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"baseURL": [
"{{HOME}}/.config/bget/meta",
"https://hiplot.com.cn/download/bget/_meta",
"https://raw.githubusercontent.com/openanno/bget/master/_meta/"
"https://raw.githubusercontent.com/clindet/bget/master/_meta/"
],
"entry": [
"default.json"
Expand Down
18 changes: 9 additions & 9 deletions _meta/tools/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,13 @@
"Tags": null,
"URL": {
"Linux": [
"https://github.com/openanno/bget/releases/download/{{version}}/bget_linux64"
"https://github.com/clindet/bget/releases/download/{{version}}/bget_linux64"
],
"Mac": [
"https://github.com/openanno/bget/releases/download/{{version}}/bget_osx"
"https://github.com/clindet/bget/releases/download/{{version}}/bget_osx"
],
"Win": [
"https://github.com/openanno/bget/releases/download/{{version}}/bget.exe"
"https://github.com/clindet/bget/releases/download/{{version}}/bget.exe"
]
},
"PostShellCmd": null
Expand All @@ -394,13 +394,13 @@
"Tags": null,
"URL": {
"Linux": [
"https://github.com/openanno/bioctl/releases/download/{{version}}/bioctl_linux64"
"https://github.com/clindet/bioctl/releases/download/{{version}}/bioctl_linux64"
],
"Mac": [
"https://github.com/openanno/bioctl/releases/download/{{version}}/bioctl_osx"
"https://github.com/clindet/bioctl/releases/download/{{version}}/bioctl_osx"
],
"Win": [
"https://github.com/openanno/bioctl/releases/download/{{version}}/bioctl.exe"
"https://github.com/clindet/bioctl/releases/download/{{version}}/bioctl.exe"
]
},
"PostShellCmd": null
Expand All @@ -413,13 +413,13 @@
"Tags": null,
"URL": {
"Linux": [
"https://github.com/openanno/bioextr/releases/download/{{version}}/bioextr_linux64"
"https://github.com/clindet/bioextr/releases/download/{{version}}/bioextr_linux64"
],
"Mac": [
"https://github.com/openanno/bioextr/releases/download/{{version}}/bioextr_osx"
"https://github.com/clindet/bioextr/releases/download/{{version}}/bioextr_osx"
],
"Win": [
"https://github.com/openanno/bioextr/releases/download/{{version}}/bioextr.exe"
"https://github.com/clindet/bioextr/releases/download/{{version}}/bioextr.exe"
]
},
"PostShellCmd": null
Expand Down
4 changes: 2 additions & 2 deletions api/cmd/biotools.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/cligov.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/covid19.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/crossRef.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/dataset2tools.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/gdc.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/mgrast.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package cmd

import (
"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/spf13/cobra"
)

Expand Down
4 changes: 2 additions & 2 deletions api/cmd/ncbi.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"
"strings"

"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/openbiox/ligo/flag"
cio "github.com/openbiox/ligo/io"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion api/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
cio "github.com/openbiox/ligo/io"
"github.com/openbiox/ligo/stringo"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion api/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"strings"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
cvrt "github.com/openbiox/ligo/convert"
cio "github.com/openbiox/ligo/io"
clog "github.com/openbiox/ligo/log"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/biotools.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
)

const BioToolsHost = "https://bio.tools/api/tool/"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/cligov.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
)

const CligovHost = "https://clinicaltrials.gov/api/"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/covid19.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"github.com/openbiox/ligo/stringo"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
)

const Covid19Host = "https://api.covid19api.com/"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/crossref.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/PuerkitoBio/goquery"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
cio "github.com/openbiox/ligo/io"
cnet "github.com/openbiox/ligo/net"
"github.com/openbiox/ligo/stringo"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/dataset2tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strconv"
"strings"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
)

const Dataset2toolsHost = "http://amp.pharm.mssm.edu/datasets2tools/api/search?"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/gdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"code.cloudfoundry.org/bytefmt"
"github.com/olekukonko/tablewriter"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
cio "github.com/openbiox/ligo/io"
cnet "github.com/openbiox/ligo/net"
mpb "github.com/vbauerster/mpb/v5"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/mgrast.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/openbiox/ligo/stringo"

"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
)

const MgRastHost = "http://api.mg-rast.org/"
Expand Down
2 changes: 1 addition & 1 deletion api/fetch/ncbi.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/biogo/ncbi"
"github.com/biogo/ncbi/entrez"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
cnet "github.com/openbiox/ligo/net"
)

Expand Down
2 changes: 1 addition & 1 deletion api/fetch/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/PuerkitoBio/goquery"
xj "github.com/basgys/goxml2json"
"github.com/openanno/bget/api/types"
"github.com/clindet/bget/api/types"
cio "github.com/openbiox/ligo/io"
clog "github.com/openbiox/ligo/log"
cnet "github.com/openbiox/ligo/net"
Expand Down
2 changes: 1 addition & 1 deletion api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package main

import (
"github.com/openanno/bget/api/cmd"
"github.com/clindet/bget/api/cmd"
)

func main() {
Expand Down
3 changes: 1 addition & 2 deletions chrome/doi.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
glog "github.com/openbiox/ligo/log"
stringo "github.com/openbiox/ligo/stringo"

"github.com/chromedp/chromedp"
cdp "github.com/chromedp/chromedp"
)

Expand Down Expand Up @@ -166,7 +165,7 @@ func visibleDownloadTask(url string, ctx context.Context) cdp.Tasks {
return nil
}),
cdp.WaitVisible(`#main-container`, cdp.ByQuery),
chromedp.OuterHTML("html", &body),
cdp.OuterHTML("html", &body),
cdp.ActionFunc(func(context.Context) error {
fmt.Println(body)
return nil
Expand Down
8 changes: 4 additions & 4 deletions cmd/doi.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"strings"
"time"

"github.com/openanno/bget/api/fetch"
"github.com/openanno/bget/api/types"
"github.com/openanno/bget/spider"
"github.com/clindet/bget/api/fetch"
"github.com/clindet/bget/api/types"
"github.com/clindet/bget/spider"
cio "github.com/openbiox/ligo/io"
cnet "github.com/openbiox/ligo/net"
"github.com/openbiox/ligo/slice"
Expand All @@ -35,7 +35,7 @@ var printCrossRefMeta bool
var DoiCmd = &cobra.Command{
Use: "doi [doi1 doi2 doi3...]",
Short: "Can be used to access files via DOI.",
Long: `Can be used to access files via DOI. More see here https://github.com/openanno/bget.`,
Long: `Can be used to access files via DOI. More see here https://github.com/clindet/bget.`,
Run: func(cmd *cobra.Command, args []string) {
doiCmdRunOptions(cmd, args)
},
Expand Down
10 changes: 5 additions & 5 deletions cmd/i.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import (
"time"

"github.com/olekukonko/tablewriter"
"github.com/openanno/bget/spider"
"github.com/openanno/bget/urlpool"
vers "github.com/openanno/bget/versions"
"github.com/clindet/bget/spider"
"github.com/clindet/bget/urlpool"
vers "github.com/clindet/bget/versions"
"github.com/openbiox/ligo/archive"
bexec "github.com/openbiox/ligo/exec"
cio "github.com/openbiox/ligo/io"
Expand All @@ -40,7 +40,7 @@ var defaultEntry = map[string][]string{
"baseURL": []string{
"{{HOME}}/.config/bget/meta",
"https://hiplot.com.cn/download/bget/_meta",
"https://raw.githubusercontent.com/openanno/bget/master/_meta/",
"https://raw.githubusercontent.com/clindet/bget/master/_meta/",
},
"entry": []string{"default.json"},
"tools": []string{"tools/main.json"},
Expand All @@ -59,7 +59,7 @@ var defaultEntry = map[string][]string{
var KeyCmd = &cobra.Command{
Use: "i [name1 name2 name3...]",
Short: "Can be used to access URLs via a key string.",
Long: `Can be used to access URLs via a key string. e.g. 'item' or 'item@version #releaseVersion', : bwa, reffa-defuse@GRCh38 #97. More see here https://github.com/openanno/bget.`,
Long: `Can be used to access URLs via a key string. e.g. 'item' or 'item@version #releaseVersion', : bwa, reffa-defuse@GRCh38 #97. More see here https://github.com/clindet/bget.`,
Run: func(cmd *cobra.Command, args []string) {
keyCmdRunOptions(cmd, args)
},
Expand Down
Loading

0 comments on commit 5d9bea2

Please sign in to comment.