Skip to content

feat: add -V/--version flag#17

Open
sitiom wants to merge 3 commits intoxhcoding:mainfrom
sitiom:version
Open

feat: add -V/--version flag#17
sitiom wants to merge 3 commits intoxhcoding:mainfrom
sitiom:version

Conversation

@sitiom
Copy link
Copy Markdown
Contributor

@sitiom sitiom commented Mar 1, 2026

Add new flag to show basic version information:

    -V, --version Print version information

Example:

> sshpass -V
sshpass-win32 1.0.7

Note: Don't forget to update the version in CMakeLists.txt for every new release

@xhcoding
Copy link
Copy Markdown
Owner

The version number should be automatically set via git tag:
When running an action each time, obtain the latest tag and pass it to CMakeLists.txt via environment variables or CMake parameters, or directly retrieve the tag within CMakeLists.txt

@sitiom
Copy link
Copy Markdown
Contributor Author

sitiom commented Mar 16, 2026

Thanks. I've now done the following:

  1. Read the version from SSHPASS_GIT_TAG parameter
  2. If parameter does not exist, fetch the latest tag from git
  3. Else, fallback to 0.0.0

I have also updated the github actions in the workflow and added Dependabot for automated update checks.

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 this pull request may close these issues.

2 participants