Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a zip file of an app dir with pack build #106

Closed
sclevine opened this issue Mar 7, 2019 · 6 comments · Fixed by #234
Closed

Support a zip file of an app dir with pack build #106

sclevine opened this issue Mar 7, 2019 · 6 comments · Fixed by #234
Assignees
Milestone

Comments

@sclevine
Copy link
Member

sclevine commented Mar 7, 2019

Acceptance Criteria

Zip file

Given my application is located at the root of a zip-formatted file
When I run pack build -p <path to zip> my-app
Then The build succeeds

Non-zip file

When I run pack build -p <path to file> my-app
Then The build fails with a message:

ERROR: the provided application path must be a directory or zip-formatted file

Notes

  • Should work regardless of file extension (check first four bytes for PK\x03\x04)
  • Should also work for pack run
@sclevine sclevine added the good first issue A good first issue to get started with. label Mar 7, 2019
@ameyer-pivotal ameyer-pivotal added the status/discussion-needed Issue or PR that requires in-depth discussion. label Apr 16, 2019
@ekcasey ekcasey removed the good first issue A good first issue to get started with. label May 28, 2019
@ameyer-pivotal
Copy link
Contributor

ameyer-pivotal commented Jun 21, 2019

@nebhale Maybe we could adapt this to support jars too, which would take care of #220

@sclevine
Copy link
Member Author

JARs are just zips, and the JBPs work on an exploded JAR already. This will probably just work. This is actually how the cf CLI works today.

@ameyer-pivotal
Copy link
Contributor

@sclevine I think pack only supports directories currently though. I agree if it will work for zips it will work for jars (as long as we allow the extension).

@nebhale
Copy link
Contributor

nebhale commented Jun 21, 2019

I'd give serious thought to not using extension but rather looking for the magic number (PK\x03\x04) instead as the file extension for Java-archives are all over the place. At first thought I know of .jar, .war, .ear, .rar, .apk, .par, and .kar.

@ameyer-pivotal
Copy link
Contributor

@nebhale That makes sense. I was hoping that we could do something like that. Thanks for the clarification.

@jromero jromero removed the status/discussion-needed Issue or PR that requires in-depth discussion. label Jul 5, 2019
jromero added a commit that referenced this issue Jul 9, 2019
Resolves #106

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Javier Romero <jromero@pivotal.io>
jromero added a commit that referenced this issue Jul 9, 2019
Resolves #106

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Javier Romero <jromero@pivotal.io>
jromero added a commit that referenced this issue Jul 9, 2019
Resolves #106

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Javier Romero <jromero@pivotal.io>
jromero added a commit that referenced this issue Jul 9, 2019
Also, disable redundant travis builds for PRs.

Resolves #106

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Javier Romero <jromero@pivotal.io>
ameyer-pivotal pushed a commit that referenced this issue Jul 10, 2019
Also, disable redundant travis builds for PRs.

Resolves #106

Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
Signed-off-by: Javier Romero <jromero@pivotal.io>
ameyer-pivotal pushed a commit that referenced this issue Jul 10, 2019
Also, disable redundant travis builds for PRs.

Resolves #106

Signed-off-by: Javier Romero <jromero@pivotal.io>
Signed-off-by: Andrew Meyer <ameyer@pivotal.io>
@mgibson1121
Copy link
Member

This story passes acceptance.

@jromero jromero added this to the 0.3.0 milestone Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants