-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
203 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
* text eol=lf | ||
* text=auto | ||
*.bat text eol=crlf | ||
*.ps1 text eol=crlf | ||
*.sh text eol=lf | ||
*.go text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ jobs: | |
go-version: 'stable' | ||
|
||
- name: Remove old Releases | ||
uses: dev-drprasad/[email protected].2 | ||
uses: dev-drprasad/[email protected].4 | ||
with: | ||
keep_latest: 0 | ||
delete_tags: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
module redl | ||
|
||
go 1.21.4 | ||
go 1.23.2 | ||
|
||
require ( | ||
github.com/gek64/gek v1.1.3-0.20240627090940-b552e88adf02 | ||
github.com/urfave/cli/v2 v2.27.2 | ||
github.com/gek64/gek v1.1.4 | ||
github.com/urfave/cli/v2 v2.27.5 | ||
) | ||
|
||
require ( | ||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect | ||
github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= | ||
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= | ||
github.com/gek64/gek v1.1.2 h1:ogLhQNbQAXkdNQ5wLTvW+Zgbn30fjqSwy2x+8jDap+E= | ||
github.com/gek64/gek v1.1.2/go.mod h1:yPhb4t8/dTQ57T+5XJ1vUlf0MEsSev2oaIYrBos+GsQ= | ||
github.com/gek64/gek v1.1.3-0.20240627090940-b552e88adf02 h1:UT+46z6eFtGzN7imveZ0zHe39en/mXBkOLe+J1ra9Z0= | ||
github.com/gek64/gek v1.1.3-0.20240627090940-b552e88adf02/go.mod h1:yPhb4t8/dTQ57T+5XJ1vUlf0MEsSev2oaIYrBos+GsQ= | ||
github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= | ||
github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= | ||
github.com/gek64/gek v1.1.4 h1:GMBPBGoJmfcNcou2THqy7p9FeXH0StAN+tFsczhxJw4= | ||
github.com/gek64/gek v1.1.4/go.mod h1:1y6E5g/LqY/WYPFsP8cSTFWYbcUzlx4qCS7XPgQO63c= | ||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= | ||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= | ||
github.com/urfave/cli/v2 v2.27.2 h1:6e0H+AkS+zDckwPCUrZkKX38mRaau4nL2uipkJpbkcI= | ||
github.com/urfave/cli/v2 v2.27.2/go.mod h1:g0+79LmHHATl7DAcHO99smiR/T7uGLw84w8Y42x+4eM= | ||
github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= | ||
github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= | ||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= | ||
github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package internal | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gek64/gek/gRelease/github" | ||
) | ||
|
||
type GithubAPI struct { | ||
r *github.Release | ||
} | ||
|
||
func GetGithubApiLatest(repo string) (api *GithubAPI, err error) { | ||
r, err := github.GetReleaseLatest(repo) | ||
return &GithubAPI{r}, err | ||
} | ||
|
||
func GetGithubApiByTagName(repo string, tagName string) (api *GithubAPI, err error) { | ||
r, err := github.GetReleaseByTagName(repo, tagName) | ||
return &GithubAPI{r}, err | ||
} | ||
|
||
func (a *GithubAPI) GetDownloadLink(includes []string, excludes []string) (downloadLink string, err error) { | ||
release := a.r.GetAssets(includes, excludes) | ||
if len(release) <= 0 { | ||
return "", fmt.Errorf("can not find the release") | ||
} | ||
return release[0].BrowserDownloadURL, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package internal | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gek64/gek/gRelease/gitlab" | ||
) | ||
|
||
type GitlabAPI struct { | ||
r *gitlab.Release | ||
} | ||
|
||
func GetGitlabApiLatest(repo string) (api *GitlabAPI, err error) { | ||
r, err := gitlab.GetReleaseLatest(repo) | ||
return &GitlabAPI{r}, err | ||
} | ||
|
||
func GetGitlabApiByTagName(repo string, tagName string) (api *GitlabAPI, err error) { | ||
r, err := gitlab.GetReleaseByTagName(repo, tagName) | ||
return &GitlabAPI{r}, err | ||
} | ||
|
||
func (a *GitlabAPI) GetDownloadLink(includes []string, excludes []string) (downloadLink string, err error) { | ||
release := a.r.GetAssets(includes, excludes) | ||
if len(release) <= 0 { | ||
return "", fmt.Errorf("can not find the release") | ||
} | ||
return release[0].URL, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package internal | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gek64/gek/gRelease/sourceForge" | ||
) | ||
|
||
type SourceForgeAPI struct { | ||
r *sourceForge.Release | ||
} | ||
|
||
func GetSourceForgeByRss(rssUrl string) (api *SourceForgeAPI, err error) { | ||
r, err := sourceForge.GetReleaseByRss(rssUrl) | ||
return &SourceForgeAPI{r}, err | ||
} | ||
|
||
func (a *SourceForgeAPI) GetDownloadLink(includes []string, excludes []string) (downloadLink string, err error) { | ||
release := a.r.GetAssets(includes, excludes) | ||
if len(release) <= 0 { | ||
return "", fmt.Errorf("can not find the release") | ||
} | ||
return release[0].Link, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters