This Bash script is designed to simplify the management of Talend modules using Git submodules and perform various tasks such as committing, cleaning, updating, and building your project. It also helps extract version and patch information from a given version-patch and generate a product.properties
file.
Before using this script, make sure you have the following prerequisites installed on your system:
- Git
- cURL
The script accepts several commands and arguments as follows:
-
commit <version-patch>
: Commit a Git submodule, extract version/patch, and save toproduct.properties
. Perform a Git commit.Example:
./talend-modules.sh commit 8.0.1-R2023-10
-
clean
: Reset Git submodules to the last committed state and clean the project's working directory.Example:
./talend-modules.sh clean
-
update
: Initialize and update Git submodules.Example:
./talend-modules.sh update
-
help
: Display usage instructions.Example:
./talend-modules.sh help
-
When using the "commit" command, the script will fetch patch information from the specified version-patch, reset the submodule to its last committed state, and then check out the submodule with the extracted version and patch. It will also create a
product.properties
file with version, patch, timestamp, release.suffix, and revision.filename and perform a Git commit using the provided version-patch as the commit message. -
The "clean" command resets Git submodules to the last committed state and removes untracked files from the project's working directory, excluding files specified in
.gitignore
. -
The "update" command initializes and updates Git submodules to their latest versions.
-
The "help" command displays this help message.
This script is provided as-is with no warranties. You may use, modify, and distribute it under the terms of your preferred open-source license.