docker / app

Make your Docker Compose applications reusable, and share them on Docker Hub
Apache License 2.0
1.57k stars 177 forks source link

WIP: refactor as a CLI plugin #433

Closed ijc closed 5 years ago

ijc commented 5 years ago

- What I did

First pass refactoring as a plugin using the framework from https://github.com/docker/cli/pull/1564.

I intend to track that PR using app as a test case for the framework. Shouldn't be merged until the plugins stuff is available!

- How to verify it

With a docker CLI binary build from https://github.com/docker/cli/pull/1564 place the docker-app built from this PR in the plugin search path (or set DOCKER_CLI_PLUGIN_EXTRA_DIRS to point to a directory containing docker-app). Then docker app «foof» should work as docker-app «foof» did previously.

GordonTheTurtle commented 5 years ago

Please sign your commits following these rules: https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work The easiest way to do this is to amend the last commit:

$ git clone -b "cli-plugin" git@github.com:ijc/docker-app.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354474752
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

codecov[bot] commented 5 years ago

Codecov Report

Merging #433 into master will decrease coverage by 0.11%. The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #433      +/-   ##
==========================================
- Coverage   62.65%   62.54%   -0.12%     
==========================================
  Files          49       49              
  Lines        2362     2339      -23     
==========================================
- Hits         1480     1463      -17     
+ Misses        679      676       -3     
+ Partials      203      200       -3
Impacted Files Coverage Δ
internal/packager/extract.go 69.41% <0%> (ø) :arrow_up:
cmd/docker-app/root.go 75% <100%> (-1.93%) :arrow_down:
cmd/docker-app/main.go 100% <100%> (+28.57%) :arrow_up:

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 78fa752...2ea4767. Read the comment docs.

ijc commented 5 years ago

Self Reminder: There's a bunch of docs updates required here too.

ijc commented 5 years ago

Closing in favour of #469