Skip to content

Commit

Permalink
revert changes for file_path
Browse files Browse the repository at this point in the history
Signed-off-by: cscanlin <[email protected]>
  • Loading branch information
cscanlin-kwh committed May 4, 2023
1 parent afb3d8e commit a9dfe1c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ Places the following files in the destination:

* `s3_uri`: A file containing the S3 URI of the object (for use with `aws cp`, etc.)

* `file_path`: A file containing the absolute path to the downloaded filename (if `skip_download` is not `true`). Makes for easy use with the `load_var` step

* `version`: The version identified in the file name.

* `tags.json`: The object's tags represented as a JSON object. Only written if `download_tags` is set to true.
Expand Down
10 changes: 1 addition & 9 deletions in/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ func (command *Command) Run(destinationDir string, request Request) (Response, e
return Response{}, err
}

destinationPath := filepath.Join(destinationDir, path.Base(remotePath))
if request.Params.Unpack {
destinationPath := filepath.Join(destinationDir, path.Base(remotePath))
mime := archiveMimetype(destinationPath)
if mime == "" {
return Response{}, fmt.Errorf("not an archive: %s", destinationPath)
Expand All @@ -139,10 +139,6 @@ func (command *Command) Run(destinationDir string, request Request) (Response, e
return Response{}, err
}
}
if err = command.WriteFilePathFile(destinationDir, destinationPath); err != nil {
return Response{}, err
}

}

if request.Params.DownloadTags {
Expand Down Expand Up @@ -199,10 +195,6 @@ func (command *Command) writeS3URIFile(destDir string, s3_uri string) error {
return ioutil.WriteFile(filepath.Join(destDir, "s3_uri"), []byte(s3_uri), 0644)
}

func (command *Command) WriteFilePathFile(destDir string, destinationPath string) error {
return ioutil.WriteFile(filepath.Join(destDir, "file_path"), []byte(destinationPath), 0644)
}

func (command *Command) writeVersionFile(destDir string, versionNumber string) error {
return ioutil.WriteFile(filepath.Join(destDir, "version"), []byte(versionNumber), 0644)
}
Expand Down

0 comments on commit a9dfe1c

Please sign in to comment.