Skip to content

Commit

Permalink
bugfix for typst
Browse files Browse the repository at this point in the history
  • Loading branch information
moqsien committed Mar 18, 2024
1 parent f774651 commit 2d45dd5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
20 changes: 10 additions & 10 deletions pkgs/pxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ func main() {
// php.FetchAll()
// php.Upload()

ins := versions.NewInstaller(cfg)
ins.GetAndroidSDKManager()
ins.GetVSCode()
ins.GetMiniconda()
ins.FetchAll()
ins.Upload()

// gh := versions.NewGithubRepo(cfg)
// gh.FetchAll()
// gh.Upload()
// ins := versions.NewInstaller(cfg)
// ins.GetAndroidSDKManager()
// ins.GetVSCode()
// ins.GetMiniconda()
// ins.FetchAll()
// ins.Upload()

gh := versions.NewGithubRepo(cfg)
gh.FetchAll()
gh.Upload()

// scala := versions.NewScala(cfg)
// scala.FetchAll()
Expand Down
15 changes: 12 additions & 3 deletions pkgs/versions/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ func filterGithubByUrl(dUrl string) bool {
"-profile.zip", // for bun
"denort-", // for deno
// "-unknown-linux-musl.tar.gz", // for fd.
"-pc-windows-msvc.zip", // for fd.
"fd$pc-windows-msvc.zip", // for fd.
"linux-gnueabihf", // for fd
"linux-musleabihf", // for fd
"kotlin-compiler-", // for kotlin
"unknown-linux-gnueabihf.", // for ripgrep
"unknown-linux-musleabi.", // for ripgrep
"unknown-linux-musleabihf.", // for ripgrep
"pc-windows-msvc.zip", // for ripgrep
"ripgrep$pc-windows-msvc.zip", // for ripgrep
"arm-unknown-linux-gnueabihf", // for typst-lsp
"typst-lsp-x86_64-unknown-linux-musl", // for typst-lsp
"-unknown-linux-musleabi.", // for typst
Expand All @@ -110,8 +110,14 @@ func filterGithubByUrl(dUrl string) bool {
"cs-x86_64-pc-win32.zip", // for coursier
"coursier.jar", // for coursier
}

for _, s := range excludeList {
if strings.Contains(dUrl, s) {
if strings.Contains(s, "$") {
ss := strings.Split(s, "$")
if strings.Contains(dUrl, ss[0]) && strings.Contains(dUrl, ss[1]) {
return false
}
} else if strings.Contains(dUrl, s) {
return false
}
}
Expand Down Expand Up @@ -143,6 +149,9 @@ func (g *GithubRepo) fetchRepo(repo string) {
ver := &VFile{}
ver.Url = asset.Url
if filterGithubByUrl(asset.Url) {
// if strings.Contains(asset.Url, "typst-") && strings.Contains(asset.Url, "windows") {
// fmt.Println(asset.Url)
// }
ver.Arch = utils.ParseArch(asset.Url)
ver.Os = utils.ParsePlatform(asset.Url)
for _, n := range ToFindVersionList {
Expand Down

0 comments on commit 2d45dd5

Please sign in to comment.