From e2d52ee6eb3c4087892342382e2d64fda85438bb Mon Sep 17 00:00:00 2001 From: filip Date: Thu, 21 Nov 2024 13:58:55 +0100 Subject: [PATCH] Change name to DEBRICKED_VERSION --- .github/workflows/test.yml | 5 ++++- internal/callgraph/language/java/soot_handler.go | 1 + internal/cmd/callgraph/callgraph.go | 1 + scripts/install.sh | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 80232ef3..ec0c32d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,7 +92,10 @@ jobs: distribution: 'temurin' - name: Install Debricked CLI - run: go install -ldflags "-X main.version=${GITHUB_REF#refs/heads/}" ./cmd/debricked + run: | + export DEBRICKED_VERSION="v2.4.0" + echo $DEBRICKED_VERSION + go install -ldflags "-X main.version=${DEBRICKED_VERSION:-GITHUB_REF#refs/heads/}" ./cmd/debricked - name: Callgraph E2E run: ./scripts/test_e2e_callgraph_java_version.sh ${{matrix.java}} diff --git a/internal/callgraph/language/java/soot_handler.go b/internal/callgraph/language/java/soot_handler.go index be786a0f..a2c0eed6 100644 --- a/internal/callgraph/language/java/soot_handler.go +++ b/internal/callgraph/language/java/soot_handler.go @@ -78,6 +78,7 @@ func (sh SootHandler) downloadCompressedSootWrapper(fs ioFs.IFileSystem, zipFile version, ".zip", }, "") + fmt.Println("URL=", fullURLFile) client := http.Client{ CheckRedirect: func(r *http.Request, via []*http.Request) error { diff --git a/internal/cmd/callgraph/callgraph.go b/internal/cmd/callgraph/callgraph.go index 1438717f..54e4df0b 100644 --- a/internal/cmd/callgraph/callgraph.go +++ b/internal/cmd/callgraph/callgraph.go @@ -128,6 +128,7 @@ func RunE(callgraph callgraph.IGenerator) func(_ *cobra.Command, args []string) configs := []conf.IConfig{} version := viper.GetString("version") + fmt.Println("DEBRICKED_VERSION=", version) for _, language := range languages { configs = append(configs, conf.NewConfig(language, args, map[string]string{}, !buildDisabled, languageMap[language], version)) diff --git a/scripts/install.sh b/scripts/install.sh index 62d78a48..ee228b29 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -4,7 +4,7 @@ if ! command -v git &> /dev/null then echo -e "Failed to find git, thus also the version. Version will be set to v0.0.0" fi -version=${VERSION:-$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)} +version=${DEBRICKED_VERSION:-$(git symbolic-ref -q --short HEAD || git describe --tags --exact-match)} ldFlags="-X main.version=${version}" go install -ldflags "${ldFlags}" ./cmd/debricked go generate -v -x ./cmd/debricked