Skip to content

Commit 95b92e7

Browse files
authored
Merge pull request #5 from intel/2024.2/release-deployment
2024.2.0 release deployment
2 parents 1f13ec3 + 0fba4e1 commit 95b92e7

7 files changed

Lines changed: 31 additions & 20 deletions

File tree

build.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
#!/usr/bin/env bash
22
export CGO_ENABLED=0
33

4-
export CGO_ENABLED=0
54
version=$(git describe --long --dirty --abbrev=10 --tags)
65
lf="-X github.com/intel/oneapi-cli/cmd.version=${version}"
76

8-
9-
GOOS=linux GOARCH=amd64 go build -ldflags "$lf" -trimpath -mod=readonly -gcflags="all=-spectre=all -N -l" -asmflags="all=-spectre=all" -ldflags="all=-s -w" -o linux/bin/oneapi-cli
10-
GOOS=windows GOARCH=amd64 go build -ldflags "$lf" -trimpath -mod=readonly -gcflags="all=-spectre=all -N -l" -asmflags="all=-spectre=all" -ldflags="all=-s -w" -o win/bin/oneapi-cli.exe
11-
GOOS=darwin GOARCH=amd64 go build -ldflags "$lf" -trimpath -mod=readonly -gcflags="all=-spectre=all -N -l" -asmflags="all=-spectre=all" -ldflags="all=-s -w" -o osx/bin/oneapi-cli
7+
GOOS=linux GOARCH=amd64 go build -trimpath -mod=readonly -gcflags="all=-spectre=all -N -l" -asmflags="all=-spectre=all" -ldflags="all=-s -w $lf" -o linux/bin/oneapi-cli
8+
GOOS=windows GOARCH=amd64 go build -trimpath -mod=readonly -gcflags="all=-spectre=all -N -l" -asmflags="all=-spectre=all" -ldflags="all=-s -w $lf" -o win/bin/oneapi-cli.exe
9+
GOOS=darwin GOARCH=amd64 go build -trimpath -mod=readonly -gcflags="all=-spectre=all -N -l" -asmflags="all=-spectre=all" -ldflags="all=-s -w $lf" -o osx/bin/oneapi-cli

cmd/clean.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ var cleanCmd = &cobra.Command{
1818
Short: "Clean Sample Cache",
1919
Long: `Removes local Sample Cache`,
2020
Run: func(cmd *cobra.Command, args []string) {
21-
os.RemoveAll(filepath.Join(baseFilePath, aggregator.AggregatorLocalAPILevel))
2221
if err := os.RemoveAll(filepath.Join(baseFilePath, aggregator.AggregatorLocalAPILevel)); err != nil {
2322
fmt.Println("Failed to clean sample cache.")
2423
fmt.Printf("%s \n", err)

cmd/list.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ import (
1212
)
1313

1414
func prettyPrint(i interface{}) string {
15-
s, _ := json.MarshalIndent(i, "", "\t")
15+
s, err := json.MarshalIndent(i, "", "\t")
16+
if err != nil {
17+
fmt.Println("Failed to pretty print Json")
18+
fmt.Printf("%s \n", err)
19+
os.Exit(1)
20+
}
1621
return string(s)
1722
}
1823

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/spf13/cobra v1.6.1
99
gitlab.com/tslocum/cview v1.4.4
1010
// golang.org/x/sys v0.0.0-20221013171732-95e765b1cc43
11-
golang.org/x/sys v0.13.0
11+
golang.org/x/sys v0.18.0
1212
)
1313

1414
require (
@@ -18,6 +18,6 @@ require (
1818
github.com/mattn/go-runewidth v0.0.8 // indirect
1919
github.com/rivo/uniseg v0.4.2 // indirect
2020
github.com/spf13/pflag v1.0.5 // indirect
21-
golang.org/x/net v0.17.0 // indirect
22-
golang.org/x/text v0.13.0 // indirect
21+
golang.org/x/net v0.23.0 // indirect
22+
golang.org/x/text v0.14.0 // indirect
2323
)

go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,18 @@ gitlab.com/tslocum/cview v1.4.4 h1:sh1MUSN5zFd7vK+lHEq1jAxRD82TJb6uFW+EnECsEyc=
2929
gitlab.com/tslocum/cview v1.4.4/go.mod h1:+bEf1cg6IoWvL16YHJAKwGGpQf5s/nxXAA7YJr+WOHE=
3030
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
3131
golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
32-
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
33-
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
32+
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
33+
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
3434
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
3535
golang.org/x/sys v0.0.0-20190626150813-e07cf5db2756/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3636
golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3737
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
38-
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
39-
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
38+
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
39+
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
4040
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
4141
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
42-
golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
43-
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
42+
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
43+
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
4444
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
4545
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
4646
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

pkg/deps/checker.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,13 +346,19 @@ func readSomeJSON(path string, something interface{}) error {
346346
if err != nil {
347347
return err
348348
}
349-
json.Unmarshal(byteValue, something)
349+
err = json.Unmarshal(byteValue, something)
350+
if err != nil {
351+
return err
352+
}
350353
return nil
351354
}
352355

353356
// keeping the same interface as the file reading function for now.
354357
func parseSomeJSON(str string, something interface{}) error {
355-
json.Unmarshal([]byte(str), something)
358+
err := json.Unmarshal([]byte(str), something)
359+
if err != nil {
360+
return err
361+
}
356362
return nil
357363
}
358364

pkg/extractor/tar.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"path/filepath"
1111
)
1212

13-
//ExtractTarGz extracts a tar.gz to the destination
13+
// ExtractTarGz extracts a tar.gz to the destination
1414
func ExtractTarGz(sourcetb string, out string) error {
1515

1616
//Ensure Output exists
@@ -73,7 +73,10 @@ func ExtractTarGz(sourcetb string, out string) error {
7373
return err
7474
}
7575

76-
f.Close()
76+
err = f.Close()
77+
if err != nil {
78+
return err
79+
}
7780
}
7881
}
7982
}

0 commit comments

Comments
 (0)