FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
linuxkit/src/cmd/linuxkit/pkg_manifest.go at master · linuxkit/linuxkit · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
linuxkit
/
linuxkit
Public
Notifications
You must be signed in to change notification settings
Fork
1k
Star
8.6k
Code
Issues
330
Pull requests
48
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
linuxkit
/
src
/
cmd
/
linuxkit
/
pkg_manifest.go
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (39 loc) · 1.19 KB
Breadcrumbs
linuxkit
/
src
/
cmd
/
linuxkit
/
pkg_manifest.go
Copy path
File metadata and controls
47 lines (39 loc) · 1.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package
main
import
(
"fmt"
"github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib"
"github.com/spf13/cobra"
)
func
pkgManifestCmd
()
*
cobra.
Command
{
var
release
string
cmd
:=
&
cobra.
Command
{
Use
:
"manifest"
,
Short
:
"update manifest in the registry for the given path based on all known platforms"
,
Long
:
`Updates the manifest in the registry for the given path based on all known platforms. If none found, no manifest created.
'path' specifies the path to the package source directory.
`
,
Args
:
cobra
.
ExactArgs
(
1
),
Aliases
: []
string
{
"index"
},
RunE
:
func
(
cmd
*
cobra.
Command
,
args
[]
string
)
error
{
pkgs
,
err
:=
pkglib
.
NewFromConfig
(
pkglibConfig
,
args
...
)
if
err
!=
nil
{
return
err
}
var
opts
[]pkglib.
BuildOpt
if
release
!=
""
{
opts
=
append
(
opts
,
pkglib
.
WithRelease
(
release
))
}
for
_
,
p
:=
range
pkgs
{
msg
:=
fmt
.
Sprintf
(
"Updating index for %q"
,
p
.
Tag
())
action
:=
"building and pushing"
fmt
.
Println
(
msg
)
if
err
:=
p
.
Index
(
opts
...
);
err
!=
nil
{
return
fmt
.
Errorf
(
"error %s %q: %w"
,
action
,
p
.
Tag
(),
err
)
}
}
return
nil
},
}
cmd
.
Flags
().
StringVar
(
&
release
,
"release"
,
""
,
"Release the given version"
)
return
cmd
}
Back
|
FazBrowse Home
|
New Git URL