Morel HOWTO
July 13, 2026 ยท View on GitHub
How to make a release (for committers)
Make sure mvn clean install, mvn site, and
mvn javadoc:javadoc javadoc:test-javadoc pass under JDK 8 - 25.
Upgrade dependencies to their latest release: run
./mvnw versions:display-dependency-updates
./mvnw versions:update-properties
and commit the modified pom.xml.
Write release notes. Run the relNotes script and append the output to HISTORY.md.
Update version numbers in
src/main/java/net/hydromatic/morel/Shell.java, README and
README.md, and the copyright date in NOTICE.
Switch to JDK 21.
Check that the sandbox is clean:
git clean -nx
mvn clean
Prepare:
export GPG_TTY=$(tty)
mvn -Prelease -DreleaseVersion=x.y.0 -DdevelopmentVersion=x.(y+1).0-SNAPSHOT release:prepare
Perform:
mvn -Prelease -DskipTests release:perform
Stage the release:
- Go to https://oss.sonatype.org and log in.
- Under "Build Promotion", click on "Staging Repositories".
- Select the line "morel-nnnn", and click "Close". You might need to click "Refresh" a couple of times before it closes.
After testing, publish the release:
- Go to https://oss.sonatype.org and log in.
- Under "Build Promotion", click on "Staging Repositories".
- Select the line "morel-nnnn", and click "Release".
Wait a couple of hours for the artifacts to appear on Maven central, and announce the release.
Update the github release list.
Manually verify a release (for committers)
A few shell behaviors involve an interactive terminal and are not
covered by the automated tests, so check them by hand before publishing
a staged release. Run the following against the release artifact, or
against a clean build (./mvnw clean install).
Start the shell, and confirm that it reports the release version:
$ ./morel
morel-java version x.y.0 (java version "21", JLine terminal, xterm-256color)
Execute a command, and confirm that the result is printed:
- "Hello, world!";
val it = "Hello, world!" : string
Quit the shell (type Ctrl-D), and confirm that the command was saved
to the history file:
$ cat ~/.morel/history
The file should contain the command you typed; each line is a Unix
timestamp, a colon, and the command. If you have not run the shell
before, confirm that the ~/.morel directory and the history file
were created.
Start the shell again, press the up-arrow key, and confirm that the
previous command is recalled. Execute another command, quit, and confirm
that ~/.morel/history has grown: the new command is appended, and the
earlier history is preserved.
Cleaning up after a failed release attempt (for committers)
# Make sure that the tag you are about to generate does not already
# exist (due to a failed release attempt)
git tag
# If the tag exists, delete it locally and remotely
git tag -d morel-X.Y.Z
git push origin :refs/tags/morel-X.Y.Z
# Remove modified files
mvn release:clean
# Check whether there are modified files and if so, go back to the
# original git commit
git status
git reset --hard HEAD