[GH-ISSUE #263] List of programs and Windows/POSIX "unit testing" scripts. #1053

Closed
opened 2026-04-16 10:15:29 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @ghost on GitHub (Jul 10, 2015).
Original GitHub issue: https://github.com/semver/semver/issues/263

It would be good to have a list of programs (binaries/scripts) that can read, write and manipulate version numbers. For example, if you have a file called "version.txt" in the root of your source code whose file contents contain a semantic version number, it would be handy to be able to run a program to, for example, read the file contents, increment the major/minor/patch number then re-save the new version number back to the file.

E.g.:

semver --filename=version.txt --increment-minor

Also, it would be good to provide unit testing scripts for such a purpose.

#!/bin/bash

if [ ! -f "$SEMVER" ] || [ ! -x "$SEMVER" ] ; then
    echo "The \$SEMVER environment variable is not set or does not indicate a semver binary." >&2
    exit 1
fi

O="1.2.0"
N=$("$SEMVER" "$O" increment-minor)
if [ $? -ne 0 ] || [ "$N" != "1.3.0" ] ; then
    echo "Error incrementing minor version." >&2
fi
Originally created by @ghost on GitHub (Jul 10, 2015). Original GitHub issue: https://github.com/semver/semver/issues/263 It would be good to have a list of programs (binaries/scripts) that can read, write and manipulate version numbers. For example, if you have a file called "version.txt" in the root of your source code whose file contents contain a semantic version number, it would be handy to be able to run a program to, for example, read the file contents, increment the major/minor/patch number then re-save the new version number back to the file. E.g.: ``` semver --filename=version.txt --increment-minor ``` Also, it would be good to provide unit testing scripts for such a purpose. ``` #!/bin/bash if [ ! -f "$SEMVER" ] || [ ! -x "$SEMVER" ] ; then echo "The \$SEMVER environment variable is not set or does not indicate a semver binary." >&2 exit 1 fi O="1.2.0" N=$("$SEMVER" "$O" increment-minor) if [ $? -ne 0 ] || [ "$N" != "1.3.0" ] ; then echo "Error incrementing minor version." >&2 fi ```
Author
Owner

@jwdonahue commented on GitHub (Dec 8, 2017):

@michaelainsworth, tool implementations are not within the scope of SemVer. Please feel free to produce whatever tooling you wish in whatever repo you like, other than semver/semver. When you have a tool, feel free to link to it from from the Tooling section of the Wiki.

Unless you have further comments or questions, please close this issue at your earliest possible convenience.

<!-- gh-comment-id:350180398 --> @jwdonahue commented on GitHub (Dec 8, 2017): @michaelainsworth, tool implementations are not within the scope of SemVer. Please feel free to produce whatever tooling you wish in whatever repo you like, other than semver/semver. When you have a tool, feel free to link to it from from the [Tooling section of the Wiki](https://github.com/semver/semver/wiki/Semantic-Versioning-(AKA:-SemVer)). Unless you have further comments or questions, please close this issue at your earliest possible convenience.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/semver#1053