-
Notifications
You must be signed in to change notification settings - Fork 408
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
show version with -v
or --version
option
#71
show version with -v
or --version
option
#71
Conversation
d5b03e3
to
e64349d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Thanks for the PR.
So, since bumping the version and generating the release not is handled automatically by semantic-release
, having it hardcoded will for sure get out of sync at some point.
Actually someone at Google had exactly the same issue, and from that they created a plugin for semantic-release
to automate that bit:
https://github.com/google/semantic-release-replace-plugin
### Features | ||
|
||
* show version with `-v` or `--version` option | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to touch CHANGELOG.md
, it will be generated automatically based on your commit message.
### Features | |
* show version with `-v` or `--version` option |
@@ -141,6 +142,10 @@ while :; do | |||
TIMEOUT="${1#*=}" | |||
shift 1 | |||
;; | |||
-v | --version) | |||
echo 2.1.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping this version in check should be automated, e.g. using https://github.com/google/semantic-release-replace-plugin.
@test "support version option" { | ||
run ./wait-for -v | ||
|
||
[ "$output" = "2.1.3" ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe here we could check if the output is in sync with the version
stated in package.json
🤷
Just to make sure that our version-bump logic succeeded.
# [2.2.0](v2.1.3...v2.2.0) (2021-11-29) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [#71](#71)
Hey! I figured I had some time left today and made the suggested changes myself such that it can hit master ASAP. 😄 Fyi, the commit which landed this feature is here: Thank you soo much for the PR ❤️ , it's definitely a good idea to have a way to keep track of which version of the script you're dealing with! |
@Addono , you're a genius |
# [2.2.0](v2.1.3...v2.2.0) (2021-12-13) ### Bug Fixes * pull image ([f3e580d](f3e580d)) * pull image ([0198f77](0198f77)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/philipp-kunz-mimacom/wait-for/issues/71)
# [2.2.0](v2.1.3...v2.2.0) (2022-01-03) ### Bug Fixes * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/philipp-kunz-mimacom/wait-for/issues/71)
# 1.0.0 (2022-02-06) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [#16](#16) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/Shingaz/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/Shingaz/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [#14](#14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2022-03-11) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [#16](#16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/Penbase/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/Penbase/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/Penbase/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [#14](#14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2022-12-21) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/gesellix/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/gesellix/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/gesellix/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/gesellix/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/gesellix/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2022-12-21) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/gesellix/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/gesellix/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/gesellix/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/gesellix/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/gesellix/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([4b9b12e](4b9b12e)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2022-12-21) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/gesellix/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/gesellix/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/gesellix/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/gesellix/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/gesellix/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([4b9b12e](4b9b12e)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2022-12-21) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/gesellix/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/gesellix/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/gesellix/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/gesellix/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/gesellix/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2023-01-08) ### Bug Fixes * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/gesellix/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/gesellix/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/gesellix/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/gesellix/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/gesellix/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2023-06-02) ### Bug Fixes * `wget` in alpine runs into an endless retry loop ([eficode#100](https://github.com/danieleagle/wait-for/issues/100)) ([b15c461](b15c461)) * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/danieleagle/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/danieleagle/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/danieleagle/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/danieleagle/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/danieleagle/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
# 1.0.0 (2023-12-09) ### Bug Fixes * `wget` in alpine runs into an endless retry loop ([eficode#100](https://github.com/fitz7/wait-for/issues/100)) ([b15c461](b15c461)) * **command:** Restore environment variables before calling `exec` ([c7631e5](c7631e5)) * correctly render the command name in the help text ([d2bbce7](d2bbce7)), closes [eficode#16](https://github.com/fitz7/wait-for/issues/16) * **http:** corrects protocol check for wget availability ([eficode#82](https://github.com/fitz7/wait-for/issues/82)) ([570c9fb](570c9fb)) * **iteration:** Remember to try one last time before giving up ([2ed5308](2ed5308)) * **timeout:** resolve degredation which prevented setting indefinite timeout ([b45e76c](b45e76c)) * typo in error message for missing wget command ([db2479e](db2479e)) * uses timeout in nc as it is used with wget ([eficode#42](https://github.com/fitz7/wait-for/issues/42)) ([0195167](0195167)) * wget timeout does not double ([206b38d](206b38d)) ### Features * adds -v and --version flag to show the version (Thanks [@philipp-kunz-mimacom](https://github.com/philipp-kunz-mimacom)) ([8636f50](8636f50)), closes [eficode#71](https://github.com/fitz7/wait-for/issues/71) * adds license header to wait-for script ([975d508](975d508)) * adds support for http using wget ([ff0d29d](ff0d29d)), closes [eficode#14](https://github.com/fitz7/wait-for/issues/14) * **option:** Restrict the timeout input to non-negative integers ([c4d125f](c4d125f)) * **option:** Support more conventional formats in the option parser ([ce95717](ce95717)) * **version:** trigger first release for v1.0.0 ([33f1343](33f1343)) ### BREAKING CHANGES * **command:** HOST, PORT and other internally used environment variables are not overwritten anymore. If you use these, then you need to manually supply them.
No description provided.