Skip to content

Commit

Permalink
fix: exclude tests.jar.sha1 files
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Mar 7, 2024
1 parent 3e0b5c9 commit b141985
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/crawler/crawler.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"golang.org/x/xerrors"
)

const mavenRepoURL = "https://repo.maven.apache.org/maven2/ai/grakn/grakn-bootup/"
const mavenRepoURL = "https://repo.maven.apache.org/maven2/"

type Crawler struct {
dir string
Expand Down Expand Up @@ -267,8 +267,8 @@ func (c *Crawler) sha1Urls(ctx context.Context, url string) ([]string, error) {
if fileName, ok := selection.Attr("href"); ok {
// don't include sources, test, javadocs, scaladoc files
if strings.HasSuffix(fileName, ".jar.sha1") && !strings.HasSuffix(fileName, "sources.jar.sha1") &&
!strings.HasSuffix(fileName, "test.jar.sha1") && !strings.HasSuffix(fileName, "javadoc.jar.sha1") &&
!strings.HasSuffix(fileName, ".scaladoc.jar.sha1") {
!strings.HasSuffix(fileName, "test.jar.sha1") && !strings.HasSuffix(fileName, "tests.jar.sha1") &&
!strings.HasSuffix(fileName, "javadoc.jar.sha1") && !strings.HasSuffix(fileName, ".scaladoc.jar.sha1") {
sha1URLs = append(sha1URLs, url+fileName)
}
}
Expand Down

0 comments on commit b141985

Please sign in to comment.