Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 18 additions & 72 deletions features/dist-archive.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world`
Then STDOUT should be:
"""
Success: Created hello-world.0.1.0.zip
"""
Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the wp-content/plugins/hello-world.0.1.0.zip file should exist

Expand All @@ -37,10 +34,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world --format=targz`
Then STDOUT should be:
"""
Success: Created hello-world.0.1.0.tar.gz
"""
Then STDOUT should match /^Success: Created hello-world.0.1.0.tar.gz \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the wp-content/plugins/hello-world.0.1.0.tar.gz file should exist

Expand All @@ -63,10 +57,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world hello-world.zip`
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the wp-content/plugins/hello-world.zip file should exist
And the wp-content/plugins/hello-world.0.1.0.zip file should not exist

Expand All @@ -80,10 +71,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world wp-content`
Then STDOUT should be:
"""
Success: Created hello-world.0.1.0.zip
"""
Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the wp-content/hello-world.0.1.0.zip file should exist
And the wp-content/plugins/hello-world.0.1.0.zip file should not exist

Expand All @@ -100,10 +88,7 @@ Feature: Generate a distribution archive of a project
Then the subdir directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world ./subdir/hello-world.zip`
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/subdir/hello-world.zip file should exist

Expand All @@ -117,10 +102,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world {RUN_DIR}/wp-content/`
Then STDOUT should be:
"""
Success: Created hello-world.0.1.0.zip
"""
Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/wp-content/hello-world.0.1.0.zip file should exist

Expand All @@ -147,10 +129,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo`
Then STDOUT should be:
"""
Success: Created foo.0.2.0-alpha.zip
"""
Then STDOUT should match /^Success: Created foo.0.2.0-alpha.zip \(Size: \d* [a-zA-Z]{1,3}\)$/
And the foo.0.2.0-alpha.zip file should exist

When I run `rm -rf foo`
Expand Down Expand Up @@ -178,10 +157,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive --create-target-dir wp-content/plugins/hello-world {RUN_DIR}/some/nested/folder/hello-world.zip`
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/some/nested/folder/hello-world.zip file should exist

Expand All @@ -195,10 +171,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive . {RUN_DIR}/hello-world.zip` from 'wp-content/plugins/hello-world'
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/hello-world.zip file should exist

Expand All @@ -212,10 +185,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive . hello-world.zip` from 'wp-content/plugins/hello-world'
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/wp-content/plugins/hello-world.zip file should exist

Expand All @@ -229,10 +199,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive . ./hello-world.zip` from 'wp-content/plugins/hello-world'
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/wp-content/plugins/hello-world/hello-world.zip file should exist

Expand All @@ -246,10 +213,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world .`
Then STDOUT should be:
"""
Success: Created hello-world.0.1.0.zip
"""
Then STDOUT should match /^Success: Created hello-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/hello-world.0.1.0.zip file should exist

Expand All @@ -263,10 +227,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world --plugin-dirname=foobar-world`
Then STDOUT should be:
"""
Success: Created foobar-world.0.1.0.zip
"""
Then STDOUT should match /^Success: Created foobar-world.0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the wp-content/plugins/foobar-world.0.1.0.zip file should exist

Expand All @@ -292,10 +253,7 @@ Feature: Generate a distribution archive of a project
Then STDERR should be empty

When I run `wp dist-archive wp-content/plugins/hello-world`
Then STDOUT should be:
"""
Success: Created hello-world.0.2.0.zip
"""
Then STDOUT should match /^Success: Created hello-world.0.2.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the wp-content/plugins/hello-world.0.2.0.zip file should exist

Expand Down Expand Up @@ -393,10 +351,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world --filename-format={name}-{version}`
Then STDOUT should be:
"""
Success: Created hello-world-0.1.0.zip
"""
Then STDOUT should match /^Success: Created hello-world-0.1.0.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the wp-content/plugins/hello-world-0.1.0.zip file should exist

Expand All @@ -410,10 +365,7 @@ Feature: Generate a distribution archive of a project
And the wp-content/plugins/hello-world/bin directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world hello-world.zip --filename-format={name}-{version}`
Then STDOUT should be:
"""
Success: Created hello-world.zip
"""
Then STDOUT should match /^Success: Created hello-world.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the wp-content/plugins/hello-world.zip file should exist
And the wp-content/plugins/hello-world-0.1.0.zip file should not exist
Expand All @@ -431,10 +383,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --filename-format={name}-{version}`
Then STDOUT should be:
"""
Success: Created foo.zip
"""
Then STDOUT should match /^Success: Created foo.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the foo.zip file should exist

Expand All @@ -451,10 +400,7 @@ Feature: Generate a distribution archive of a project
Then the subdir directory should exist

When I run `wp dist-archive wp-content/plugins/hello-world ./subdir/hello-world-dist.zip`
Then STDOUT should be:
"""
Success: Created hello-world-dist.zip
"""
Then STDOUT should match /^Success: Created hello-world-dist.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And STDERR should be empty
And the {RUN_DIR}/subdir/hello-world-dist.zip file should exist

Expand Down
40 changes: 8 additions & 32 deletions features/distignore.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo`
Then STDOUT should be:
"""
Success: Created foo.zip
"""
Then STDOUT should match /^Success: Created foo.zip \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/

When I run `rm -rf foo`
Then the foo directory should not exist
Expand Down Expand Up @@ -67,10 +64,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --format=<format>`
Then STDOUT should be:
"""
Success: Created foo.<extension>
"""
Then STDOUT should match /^Success: Created foo.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the foo.<extension> file should exist

When I run `rm -rf foo`
Expand Down Expand Up @@ -112,10 +106,7 @@ Feature: Generate a distribution archive of a project
Then the foo/.git/subfolder/version.control file should exist

When I run `wp dist-archive foo --format=<format>`
Then STDOUT should be:
"""
Success: Created foo.<extension>
"""
Then STDOUT should match /^Success: Created foo.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the foo.<extension> file should exist

When I run `rm -rf foo`
Expand Down Expand Up @@ -164,10 +155,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --format=<format> --plugin-dirname=<plugin-dirname>`
Then STDOUT should be:
"""
Success: Created <plugin-dirname>.<extension>
"""
Then STDOUT should match /^Success: Created <plugin-dirname>.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the <plugin-dirname>.<extension> file should exist

When I run `rm -rf foo`
Expand Down Expand Up @@ -215,10 +203,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --format=<format> --plugin-dirname=<plugin-dirname>`
Then STDOUT should be:
"""
Success: Created <plugin-dirname>.<extension>
"""
Then STDOUT should match /^Success: Created <plugin-dirname>.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the <plugin-dirname>.<extension> file should exist

When I run `rm -rf foo`
Expand Down Expand Up @@ -262,10 +247,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --format=<format> --plugin-dirname=<plugin-dirname>`
Then STDOUT should be:
"""
Success: Created <plugin-dirname>.<extension>
"""
Then STDOUT should match /^Success: Created <plugin-dirname>.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the <plugin-dirname>.<extension> file should exist

When I run `rm -rf foo`
Expand Down Expand Up @@ -310,10 +292,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --format=<format> --plugin-dirname=<plugin-dirname>`
Then STDOUT should be:
"""
Success: Created <plugin-dirname>.<extension>
"""
Then STDOUT should match /^Success: Created <plugin-dirname>.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the <plugin-dirname>.<extension> file should exist

When I run `mv foo sourcefoo`
Expand Down Expand Up @@ -360,10 +339,7 @@ Feature: Generate a distribution archive of a project
"""

When I run `wp dist-archive foo --format=<format> --plugin-dirname=<plugin-dirname>`
Then STDOUT should be:
"""
Success: Created <plugin-dirname>.<extension>
"""
Then STDOUT should match /^Success: Created <plugin-dirname>.<extension> \(Size: \d+(?:\.\d*)? [a-zA-Z]{1,3}\)$/
And the <plugin-dirname>.<extension> file should exist

When I run `mv foo sourcefoo`
Expand Down
Loading