This repository serves as a shared toolkit aimed at improving efficiency in tasks related to project lifecycle management.
The Simple Build Tool Wrapper (sbtw
) scripts enable the use of sbt (Simple Build Tool) without requiring
pre-installation. They dynamically download and execute the appropriate version of sbt
based on the sbt.version
specified in the project's build.properties
file.
sbtw
: A Bash script for Linux and macOS users.sbtw.ps1
: A PowerShell script for Windows users.
- Verify that a
project/build.properties
file exists and specifies a validsbt.version
. - Run the script from the root of the project directory, passing regular
sbt
commands as arguments (e.g.,compile
,test
):- For Linux or macOS:
./sbtw <sbt-arguments>
- For Windows (PowerShell):
./sbtw.ps1 <sbt-arguments>
- For Linux or macOS:
- Bash script:
- Requires
curl
to be installed and available in the systemPATH
. - Requires an active internet connection to download necessary files.
- Requires
- PowerShell script:
- Requires PowerShell 5.0 or later (or PowerShell Core for cross-platform use).
- Requires an active internet connection to download necessary files.
These scripts simplify the creation of annotated and GPG-signed Git release tags in compliance with the stricter Semantic Versioning (SemVer) specification. They enforce consistency in tagging practices to simplify release workflows and ensure a predictable release process.
git-tag-release.sh
: A Bash script for Linux and macOS users.git-tag-release.ps1
: A PowerShell script for Windows users.
- Ensure the following checks are completed:
- The current working directory is a valid Git repository.
- There are no uncommitted changes in your working directory.
- GPG signing is configured and functional in Git.
- To tag a release, execute the script with the desired version:
- For Linux or macOS:
./git-tag-release.sh <version>
- For Windows (PowerShell):
./git-tag-release.ps1 <version>
- For Linux or macOS:
The version must conform to the updated strict Semantic Versioning (SemVer) rules implemented in the scripts:
-
Main version:
- The format must be
X.Y.Z
whereX
,Y
, andZ
are non-negative integers. - Examples of valid main versions:
1.0.0
,2.3.1
,0.9.5
.
- The format must be
-
Prerelease versions (optional):
- A prerelease version must include an allowed qualifier and a numeric part.
- Supported qualifiers (case-insensitive):
- Alpha (
alpha
,a
) - Beta (
beta
,b
) - Milestone (
milestone
,m
) - Release Candidate (
rc
,cr
)
- Alpha (
- Examples of valid prerelease versions:
1.0.0-alpha.1
,2.3.1-beta.2
,0.9.5-rc.3
.
-
Build metadata:
- Build metadata (e.g.,
1.0.0+build123
) is not permitted.
- Build metadata (e.g.,
-
Examples of valid versions:
1.0.0
1.0.0-alpha.1
2.1.3-beta.2
3.0.0-rc.5
-
Examples of invalid versions:
1.0.0+build123
(Build metadata is disallowed)1.0.0-alpha
(Missing numeric part for prerelease qualifier)1.0.0-beta.xyz
(Prerelease must end with a number)1.0.0-gamma.1
(gamma
is not a valid qualifier)
- The script performs validation of the version string and reports errors if the provided version does not meet the required format.
- If any required conditions are not met (e.g., uncommitted changes or invalid versions), the script terminates with an error message.
- The script automatically prefixes the version with
v
when creating Git tags (e.g.,v1.0.0
).
This repository and its scripts are published under the CC0 1.0 Universal (Public Domain Dedication). This means that you are free to use, adapt, and redistribute them without any restrictions.
For more information about the CC0 1.0 Universal licence, please visit https://creativecommons.org/publicdomain/zero/1.0/.
If you encounter any issues, please raise an issue in the repository or submit a pull request. Detailed bug reports or proposals with a clear explanation are appreciated.