Skip to content

Commit

Permalink
Change name to DEBRICKED_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
filip-debricked committed Nov 22, 2024
1 parent 9ba411d commit ffff91f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
distribution: 'temurin'

- name: Install Debricked CLI
run: go install -ldflags "-X main.version=${GITHUB_REF#refs/heads/}" ./cmd/debricked
run: |
go install -ldflags "-X main.version=v2.4.0" ./cmd/debricked
- name: Callgraph E2E
run: ./scripts/test_e2e_callgraph_java_version.sh ${{matrix.java}}
Expand Down
1 change: 1 addition & 0 deletions internal/callgraph/language/java/soot_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/callgraph/callgraph.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func RunE(callgraph callgraph.IGenerator) func(_ *cobra.Command, args []string)
}

configs := []conf.IConfig{}
version := viper.GetString("version")
version := viper.GetString("cliVersion")

for _, language := range languages {
configs = append(configs, conf.NewConfig(language, args, map[string]string{}, !buildDisabled, languageMap[language], version))
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/root/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Complete documentation is available at https://docs.debricked.com/tools-and-inte
},
Version: version,
}
viper.Set("cliVersion", version)
viper.SetEnvPrefix("DEBRICKED")
viper.AutomaticEnv()
viper.MustBindEnv(AccessTokenFlag)
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ffff91f

Please sign in to comment.