Skip to content

Commit

Permalink
feat!: from changed to singular positional argument
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperC286 committed Dec 17, 2024
1 parent 17014d6 commit 76d6ea1
Show file tree
Hide file tree
Showing 20 changed files with 126 additions and 279 deletions.
16 changes: 8 additions & 8 deletions end-to-end-tests/features/assert_current_version.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,58 @@ Feature: The current version argument supplied is asserted to be equal or greate

Scenario Outline: The current version assertion passes with batched together increments.
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --current-version is provided as "<current_version>".
And the argument --calculation-mode is provided as "batch".
Then the current version assertion passes.


Examples:
| repository | checkout_commit | from_commit_hash | from_version | current_version |
| repository | checkout_commit | commit_hash | from_version | current_version |
| https://github.com/yargs/yargs.git | 089417550ef5a5b8ce3578dd2a989191300b64cd | 262e796329f4a09083ca07e49f926ae43ac850e9 | 0.2.1 | 0.2.2 |
| https://github.com/BlazeSoftware/atoms.git | c2dcb3e97a1bd3516bed85ff1769c30211f2337a | 46dd08718905cbdd2d056a2eac720052b9691985 | 11.0.0 | 12.0.1 |
| https://github.com/gembaadvantage/uplift | ca8345039fbaceb667928d65741a43df3f72e1e6 | 30f8c01e28c70d53a25f7b20d93679d23ae0830b | 1.12.1 | 1.13.0 |


Scenario Outline: The current version assertion fails with batched together increments.
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --current-version is provided as "<current_version>".
And the argument --calculation-mode is provided as "batch".
Then the current version assertion fails.


Examples:
| repository | checkout_commit | from_commit_hash | from_version | current_version |
| repository | checkout_commit | commit_hash | from_version | current_version |
| https://github.com/yargs/yargs.git | 089417550ef5a5b8ce3578dd2a989191300b64cd | 262e796329f4a09083ca07e49f926ae43ac850e9 | 0.2.1 | 0.2.1 |
| https://github.com/BlazeSoftware/atoms.git | c2dcb3e97a1bd3516bed85ff1769c30211f2337a | 46dd08718905cbdd2d056a2eac720052b9691985 | 11.0.0 | 11.0.3 |


Scenario Outline: The current version assertion passes with consecutive increments.
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --current-version is provided as "<current_version>".
Then the current version assertion passes.


Examples:
| repository | checkout_commit | from_commit_hash | from_version | current_version |
| repository | checkout_commit | commit_hash | from_version | current_version |
| https://github.com/istanbuljs/istanbuljs.git | 1b52fe750d1f800c34dbff168614c0c73bd76026 | 5afe20347dd3ae954b31707a67f381f87920797f | 4.1.2 | 4.2.7 |
| https://gitlab.com/dmfay/massive-js.git | 482c364acf5505b81c55245fac0472890d351662 | 3f20134864b19b11541287af440540c7ad0ed986 | 2.0.1 | 3.1.0 |


Scenario Outline: The current version assertion fails with consecutive increments.
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --current-version is provided as "<current_version>".
Then the current version assertion fails.


Examples:
| repository | checkout_commit | from_commit_hash | from_version | current_version |
| repository | checkout_commit | commit_hash | from_version | current_version |
| https://github.com/istanbuljs/istanbuljs.git | 1b52fe750d1f800c34dbff168614c0c73bd76026 | 5afe20347dd3ae954b31707a67f381f87920797f | 4.1.2 | 4.1.3 |
| https://gitlab.com/dmfay/massive-js.git | 482c364acf5505b81c55245fac0472890d351662 | 3f20134864b19b11541287af440540c7ad0ed986 | 2.0.1 | 2.1.0 |
4 changes: 2 additions & 2 deletions end-to-end-tests/features/batch_semantic_versioning.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ Feature: The increments are batched together and the largest increment determine

Scenario Outline:
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --calculation-mode is provided as "batch".
Then the returned version should be "<expected_version>".


Examples:
| repository | checkout_commit | from_commit_hash | from_version | expected_version |
| repository | checkout_commit | commit_hash | from_version | expected_version |
| https://github.com/yargs/yargs.git | 089417550ef5a5b8ce3578dd2a989191300b64cd | 262e796329f4a09083ca07e49f926ae43ac850e9 | 0.2.1 | 0.2.2 |
| https://github.com/yargs/yargs.git | 027a6365b737e13116811a8ef43670196e1fa00a | 1f26de809432be9cc6f4f185629f6e5d13236598 | 0.2.3 | 0.3.0 |
| https://github.com/yargs/yargs.git | 18b0b752424bf560271e670ff95a0f90c8386787 | ecfc2c474575c6cdbc6d273c94c13181bd1dbaa6 | 1.0.3 | 1.1.0 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ Feature: The increments are applied consecutively to calculate the next semantic

Scenario Outline:
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
Then the returned version should be "<expected_version>".


Examples:
| repository | checkout_commit | from_commit_hash | from_version | expected_version |
| repository | checkout_commit | commit_hash | from_version | expected_version |
| https://github.com/yargs/yargs.git | 089417550ef5a5b8ce3578dd2a989191300b64cd | 262e796329f4a09083ca07e49f926ae43ac850e9 | 0.2.1 | 0.2.2 |
| https://github.com/yargs/yargs.git | 027a6365b737e13116811a8ef43670196e1fa00a | 1f26de809432be9cc6f4f185629f6e5d13236598 | 0.2.3 | 0.3.0 |
| https://github.com/yargs/yargs.git | 18b0b752424bf560271e670ff95a0f90c8386787 | ecfc2c474575c6cdbc6d273c94c13181bd1dbaa6 | 1.0.3 | 1.1.1 |
Expand Down
79 changes: 0 additions & 79 deletions end-to-end-tests/features/from_arguments_conflicts.feature

This file was deleted.

14 changes: 7 additions & 7 deletions end-to-end-tests/features/from_commit_hash.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,41 @@ Feature: A Git commit hash can be provided as an argument to indicate where to s

Scenario Outline:
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --current-version is provided as "<current_version>".
Then the current version assertion passes.


Examples:
| repository | checkout_commit | from_commit_hash | from_version | current_version |
| repository | checkout_commit | commit_hash | from_version | current_version |
| https://github.com/istanbuljs/istanbuljs.git | 1b52fe750d1f800c34dbff168614c0c73bd76026 | 5afe20347dd3ae954b31707a67f381f87920797f | 4.1.2 | 4.2.7 |
| https://gitlab.com/dmfay/massive-js.git | 482c364acf5505b81c55245fac0472890d351662 | 3f20134864b19b11541287af440540c7ad0ed986 | 2.0.1 | 3.1.0 |


Scenario Outline:
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
And the argument --current-version is provided as "<current_version>".
Then the current version assertion fails.


Examples:
| repository | checkout_commit | from_commit_hash | from_version | current_version |
| repository | checkout_commit | commit_hash | from_version | current_version |
| https://github.com/istanbuljs/istanbuljs.git | 1b52fe750d1f800c34dbff168614c0c73bd76026 | 5afe20347dd3ae954b31707a67f381f87920797f | 4.1.2 | 4.1.3 |
| https://gitlab.com/dmfay/massive-js.git | 482c364acf5505b81c55245fac0472890d351662 | 3f20134864b19b11541287af440540c7ad0ed986 | 2.0.1 | 2.1.0 |


Scenario Outline: When you provide an invalid commit hash a relevant error message is returned.
Given the repository "<repository>" is cloned and checked out at the commit "<checkout_commit>".
When the argument --from-commit-hash is provided as "<from_commit_hash>".
When linting from the "<commit_hash>".
And the argument --from-version is provided as "<from_version>".
Then their is a could not find commit hash "<from_commit_hash>" error.
Then their is a could not find commit hash "<commit_hash>" error.


Examples:
| repository | checkout_commit | from_commit_hash | from_version |
| repository | checkout_commit | commit_hash | from_version |
| https://github.com/SergioBenitez/Rocket.git | 549c9241c41320fc5af76b53c2ffc3bd8db88f8c | ecfc2c474575c6cdbc6d273c94c13181bd1dbaa6 | 1.0.4 |
| https://github.com/electron/electron.git | 8798571a77a4d2a7e073b046d2e8b56caa4d1e68 | a115eaa633856eb0b09f4019952f866e6b4ef96d | 0.2.12 |
| https://gitlab.com/gitlab-org/release-cli.git | 451e0773944e47a4e2678c67691a69cf8934e76e | 1260e8a74de5c29c85ffd4e2b91632236ea55c3a | 3.2.0 |
Loading

0 comments on commit 76d6ea1

Please sign in to comment.