Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Fix docker-app save on single-file application #352

Merged
merged 1 commit into from
Aug 22, 2018

Conversation

vdemeester
Copy link
Contributor

@vdemeester vdemeester commented Aug 22, 2018

Fixes #351

  • needs a regression test though 😉
  • once merged, we need to do a 0.4.1 release 👼

Signed-off-by: Vincent Demeester vincent@sbr.pm

Copy link
Member

@chris-crone chris-crone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo

df := filepath.Join(app.Path, "__Dockerfile-docker-app__")
dir, err := ioutil.TempDir("", app.Name)
if err != nil {
return "", errors.Wrap(err, "cannot create temporary directoryr")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

directoryr -> directory

types/types.go Outdated
@@ -39,6 +39,19 @@ func (a *App) Metadata() []byte {
return a.metadataContent
}

func (a *App) Extract(path string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint error, missing method doc.

types/types.go Outdated
@@ -39,6 +39,19 @@ func (a *App) Metadata() []byte {
return a.metadataContent
}

func (a *App) Extract(path string) error {
if err := ioutil.WriteFile(filepath.Join(path, internal.MetadataFileName), a.Metadata(), 0755); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: mode should rather be 0644, no need for exec bit

@vdemeester vdemeester force-pushed the 351-fix-save branch 2 times, most recently from fe4e1c6 to 0dac7a6 Compare August 22, 2018 09:26
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
@codecov
Copy link

codecov bot commented Aug 22, 2018

Codecov Report

Merging #352 into master will decrease coverage by 0.17%.
The diff coverage is 51.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #352      +/-   ##
==========================================
- Coverage    58.6%   58.42%   -0.18%     
==========================================
  Files          56       56              
  Lines        2802     2819      +17     
==========================================
+ Hits         1642     1647       +5     
- Misses        939      945       +6     
- Partials      221      227       +6
Impacted Files Coverage Δ
types/types.go 86.6% <25%> (-4.74%) ⬇️
internal/packager/registry.go 69.3% <60.86%> (-3.52%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 643134b...a8a9779. Read the comment docs.

Copy link
Contributor

@mnottale mnottale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chris-crone chris-crone merged commit 48c0769 into docker:master Aug 22, 2018
@vdemeester vdemeester deleted the 351-fix-save branch August 22, 2018 12:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants