Skip to content

Commit 1df3757

Browse files
paketo-botpacostas
andauthored
Updates github-config (#206)
* Updating github-config * fix: removing unused utils --------- Co-authored-by: Costas Papastathis <papastathiscr@gmail.com>
1 parent 88390a1 commit 1df3757

File tree

2 files changed

+3
-51
lines changed

2 files changed

+3
-51
lines changed

internal/utils/utils.go

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package utils
22

33
import (
44
"bytes"
5-
"encoding/json"
65
"fmt"
76
"os"
87

@@ -117,50 +116,3 @@ func RemoveImages(docker occam.Docker, imageIDs []string) error {
117116

118117
return nil
119118
}
120-
121-
func GetLifecycleImageID(docker occam.Docker, builderImageUrl string) (lifecycleImageID string, err error) {
122-
123-
lifecycleVersion, err := GetLifecycleVersion(builderImageUrl)
124-
if err != nil {
125-
return "", err
126-
}
127-
128-
lifecycleImageID = fmt.Sprintf("buildpacksio/lifecycle:%s", lifecycleVersion)
129-
130-
return lifecycleImageID, nil
131-
}
132-
133-
type Builder struct {
134-
LocalInfo struct {
135-
Lifecycle struct {
136-
Version string `json:"version"`
137-
} `json:"lifecycle"`
138-
} `json:"remote_info"`
139-
}
140-
141-
func GetLifecycleVersion(builderUrl string) (string, error) {
142-
buf := bytes.NewBuffer(nil)
143-
pack := pexec.NewExecutable("pack")
144-
err := pack.Execute(pexec.Execution{
145-
Stdout: buf,
146-
Stderr: buf,
147-
Args: []string{
148-
"builder",
149-
"inspect",
150-
builderUrl,
151-
"-o",
152-
"json",
153-
},
154-
})
155-
156-
if err != nil {
157-
return "", err
158-
}
159-
160-
var builder Builder
161-
err = json.Unmarshal([]byte(buf.String()), &builder)
162-
if err != nil {
163-
return "", err
164-
}
165-
return builder.LocalInfo.Lifecycle.Version, nil
166-
}

scripts/.util/tools.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"crane": "v0.20.7",
3-
"jam": "v2.15.2",
2+
"crane": "v0.21.0",
3+
"jam": "v2.15.3",
44
"pack": "v0.40.0",
5-
"syft": "v1.42.0"
5+
"syft": "v1.42.1"
66
}

0 commit comments

Comments
 (0)