Skip to content

Add version test #92

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ If submiting a new pull request addressing an already open issue with gitflow-av

For any new PRs releated to gitflow-cjs you can use on of the keywords from [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) to automatically close the releated issue.

## Running tests

To run the basic test suite execute:

```shell
bash tests/version.sh
```


## License terms

git-flow is published under the FreeBSD License, see the
Expand Down
11 changes: 11 additions & 0 deletions tests/version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
expected=$(grep -m1 '^GITFLOW_VERSION=' git-flow-version | cut -d'=' -f2)
output=$(bash -c 'source ./git-flow-version; cmd_default')
if [ "$output" = "$expected (CJS Edition)" ]; then
echo "Version test passed"
exit 0
else
echo "Expected '$expected (CJS Edition)' but got '$output'" >&2
exit 1
fi