-
Notifications
You must be signed in to change notification settings - Fork 94
Developing TNoodle 101
Nobody commits directly to cubing/tnoodle. Instead, people fork cubing/tnoodle, commit there, and issue a pull request. The rest of this guide assumes you have cloned your own fork of cubing/tnoodle and have opened a bash prompt in that directory.
Back when TNoodle was just my personal project, I decided it would be a good idea to write my own build system from scratch. This was not a good idea. To run TNoodleMakeTools (tmt) you need:
- Python 3+. tmt only runs on Python3.
- JDK 6+. Both java and javac must be in your PATH.
java -version
andjavac -version
should output the same thing. - Node (and NPM). This is needed to install jshint, which is needed for linting javascript files. We have a git pre-commit hook that runs jshint on any modified javascript files.
Some useful tmt
commands:
-
./tmt graph --descriptions
- A good way to get an overview of what comprises TNoodle, and the dependencies between those things. -
./tmt make run -p wca
- Compile and run wca target.make run
is very useful for developing. -
./tmt make dist -p wca
- This produces a jar file in timer/dist. Sometimes running the jar file behaves differently than doing amake run
. -
TNOODLE_GH_ACCESS_TOKEN=... ./tmt release
- This is how files make their way to https://github.com/cubing/tnoodle/releases. Don't run this command unless you mean it! If you don't have a personal access token set up yet, you can create one here. Selecting therepo
scope is enough.
IMPORTANT: Make sure every translation is up to date before releasing!! You can check the status of the translations via ./tmt i18n check
.
IMPORTANT: Be sure to follow the instructions for Release Testing.
Edit version attribute in bower.json, and commit the change. Then run ./tmt release
.
It will create a commit with the new compiled tnoodle.js
, a new version tag, as well as a draft for the release. After that, send in two PRs to the WCA website, one to update the regulations-data
branch and one to update the master
branch.
I prefer to do Java development in Eclipse, so I made sure that each tnoodle project is a full fledged Eclipse project (they each have a .classpath and .project file). Furthermore, the whole tnoodle directory can be opened as an Eclipse workspace. Simply go to File > Import > Existing Projects into Workspace, and enter your tnoodle directory under "Select root directory". Eclipse should automagically detect all the tnoodle projects.
git pull [email protected]:cubing/tnoodle.git [master]
-
git push
updates your fork of cubing/tnoodle