-
Notifications
You must be signed in to change notification settings - Fork 13
Upgrading
bld
offers a very convenient way to upgrade an existing project to the
latest version. If you use a package manager like Homebrew or SDKMAN!, a
global bld
tool will be installed on your system. This tool can be used to
automatically upgrade your project.
Do to so, just type:
bld
NOTE: you can also use the self-contained
bld
jar instead, you can find more information in the installation section.
You'll see the welcome message with a list of commands that are supported, for instance:
Welcome to bld 2.1.0.
The bld CLI provides its features through a series of commands that
perform specific tasks.
The following commands are supported:
create Creates a new project from multiple choice
create-app Creates a new Java application project
create-base Creates a new Java baseline project
create-lib Creates a new Java library project
create-rife2 Creates a new RIFE2 web application project
help Provides help about any of the other commands
upgrade Upgrades the bld wrapper to the latest version
version Outputs the version of the build system
The following bld arguments are supported:
--offline Works without Internet (only as first argument)
-?, -h, --help Shows the help
-D<name>=<value> Sets a JVM system property
-s, --stacktrace Prints out the stacktrace for exceptions
You'll notice that the version is 2.1.0
and also that upgrade
is one
of the available commands.
NOTE: you could have used the
bld version
command to directly check the version, but I wanted to highlight theupgrade
command at the same time
With your project as your current directory, you can check the version directly:
./bld version
bld 1.9.1
You can see that the version is older than the installed version of bld
.
Still with your project as your current directory, you can use the globally
installed version of bld
to perform the upgrade.
bld upgrade
The wrapper was successfully upgraded to 2.1.0.
NOTE: it can be confusing to spot the difference between
bld
and./bld
, the first one is installed in your global path, the second one is project specific. Upgrading is only available from the globally installedbld
.
TIP: since
bld
doesn't need to be installed and can be ran directly from its jar file, you can upgrade any project without requiring any installation, for instance:
bash -c "$(curl -fsSL https://rife2.com/bld/upgrade.sh)"
You can now use the version command again with your project's bld:
./bld version
bld 2.1.0
By using git
you can also verify exactly which files were changed:
git status
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: .idea/libraries/bld.xml
modified: .vscode/settings.json
modified: lib/bld/bld-wrapper.jar
modified: lib/bld/bld-wrapper.properties
no changes added to commit (use "git add" and/or "git commit -a")
Next learn more about Extensions