mirror of
https://github.com/SagerNet/sing-geoip.git
synced 2025-12-16 14:23:17 +08:00
Update dependencies
This commit is contained in:
24
main.go
24
main.go
@@ -10,18 +10,19 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/google/go-github/v45/github"
|
||||
"github.com/maxmind/mmdbwriter"
|
||||
"github.com/maxmind/mmdbwriter/inserter"
|
||||
"github.com/maxmind/mmdbwriter/mmdbtype"
|
||||
"github.com/oschwald/geoip2-golang"
|
||||
"github.com/oschwald/maxminddb-golang"
|
||||
"github.com/sagernet/sing-box/common/srs"
|
||||
C "github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing-box/log"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common"
|
||||
E "github.com/sagernet/sing/common/exceptions"
|
||||
|
||||
"github.com/google/go-github/v45/github"
|
||||
"github.com/maxmind/mmdbwriter"
|
||||
"github.com/maxmind/mmdbwriter/inserter"
|
||||
"github.com/maxmind/mmdbwriter/mmdbtype"
|
||||
"github.com/oschwald/geoip2-golang"
|
||||
"github.com/oschwald/maxminddb-golang"
|
||||
)
|
||||
|
||||
var githubClient *github.Client
|
||||
@@ -189,6 +190,7 @@ func release(source string, destination string, output string, ruleSetOutput str
|
||||
for code := range countryMap {
|
||||
allCodes = append(allCodes, code)
|
||||
}
|
||||
|
||||
writer, err := newWriter(metadata, allCodes)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -198,6 +200,15 @@ func release(source string, destination string, output string, ruleSetOutput str
|
||||
return err
|
||||
}
|
||||
|
||||
writer, err = newWriter(metadata, []string{"cn"})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = write(writer, countryMap, "geoip-cn.db", []string{"cn"})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
os.RemoveAll(ruleSetOutput)
|
||||
err = os.MkdirAll(ruleSetOutput, 0o755)
|
||||
if err != nil {
|
||||
@@ -229,6 +240,7 @@ func release(source string, destination string, output string, ruleSetOutput str
|
||||
}
|
||||
outputRuleSet.Close()
|
||||
}
|
||||
|
||||
setActionOutput("tag", *sourceRelease.Name)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user