Always embed URL provided by user in the archive (#1413)
To keep archive creation implementation simple and prevent any confusion, we decided to remove `--keepurl` flag and embed URL directly without downloading the file from it . In this way, we can ensure consistent behavior in either package creation or spec file creation. Also, it increases the portability of spec file.
This commit is contained in:
@@ -169,11 +169,11 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
|
||||
}
|
||||
|
||||
buildcmd := input.String(flagkey.PkgBuildCmd)
|
||||
keepURL := input.Bool(flagkey.PkgKeepURL)
|
||||
pkgName := fmt.Sprintf("%v-%v", fnName, uuid.NewV4().String())
|
||||
|
||||
// create new package in the same namespace as the function.
|
||||
pkgMetadata, err = _package.CreatePackage(input, opts.client, fnName, fnNamespace, envName, envNamespace,
|
||||
srcArchiveFiles, deployArchiveFiles, buildcmd, specDir, opts.specFile, noZip, keepURL)
|
||||
pkgMetadata, err = _package.CreatePackage(input, opts.client, pkgName, fnNamespace, envName, envNamespace,
|
||||
srcArchiveFiles, deployArchiveFiles, buildcmd, specDir, opts.specFile, noZip)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "error creating package")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user