These scripts are used to build and release the content for tiddlywiki.com. They are not designed for general purpose use – they resolve problems that are specific to the task of building tiddlywiki.com: pushing to GitHub Pages, handling the prerelease builds and bumping version numbers.
Nonetheless, you may find techniques that are useful for your own scripts.
Hosting
https://tiddlywiki.com is served by GitHub Pages from the repository https://github.com/TiddlyWiki/tiddlywiki.com-gh-pages
The scripts live in the repository https://github.com/Jermolene/build.jermolene.github.io
Directory structure
These scripts require the following directories to be siblings:
build.jermolene.github.io
- a local copy of https://github.com/Jermolene/build.jermolene.github.iojermolene.github.io
- a local copy of the repo https://github.com/TiddlyWiki/tiddlywiki.com-gh-pagesTiddlyWiki5
- a local copy of the repo https://github.com/TiddlyWiki/TiddlyWiki5
The scripts are designed to be executed with the current directory being the TiddlyWiki5
directory.
Configuration
package.json
The package.json
in the root of the build.jermolene.github.io
repository contains a dependency declaration that specifies the latest official released version of TiddlyWiki to be used when building the release targets:
"dependencies": {
"tiddlywiki": "5.1.2"
}
Environment variables
Some of the scripts use the following environment variables:
- TW5_BUILD_MAIN_EDITION - the path to the wiki folder to be used as the main edition, generating
index.html
andencrypted.html
- TW5_BUILD_OUTPUT - the path to the output folder (defaults to
../jermolene.github.io
) - TW5_BUILD_TIDDLYWIKI - the pathname of the
tiddlywiki.js
to be used (defaults to../build.jermolene.github.io/node_modules/tiddlywiki/tiddlywiki.js
)
Scripts
bld.sh
Builds the tiddlywiki.com
target files. By default, it uses the version of tiddlywiki specified in the package.json
file. This can be overridden with the TW5_BUILD_TIDDLYWIKI environment variable. The following command would select the latest prerelease version of tiddlywiki from the TiddlyWiki5
directory:
TW5_BUILD_TIDDLYWIKI=./tiddlywiki.js
readme-bld.sh
Builds the readme files for the TiddlyWiki5
and build.jermolene.github.io
repos using the released version of TiddlyWiki specified in package.json
.
prerelease-bld.sh
Builds the tiddlywiki.com/prerelease
target files using the latest TiddlyWiki prerelease code and special prerelease edition for the content.
github-push.sh
Pushes the latest changes to the jermolene.github.io
directory to GitHub.
dev-bld.sh
Builds the dev prerelease edition.
quick-bld.sh
Builds the prerelease prerelease edition.
tiddlyspace-upload.sh
Builds the tw5tiddlyweb edition and uploads it to TiddlySpace.
verbump.sh
Bumps the version number of the package.json
in the TiddlyWiki5
repo and applies the correct version tag to the repo.
npm-publish.sh
Publishes the TiddlyWiki5
repo to npm.
Procedures
Releasing a new version of TiddlyWiki
Preparation on master
- Ensure the new release banner image is up to date
- Update master with changes from tiddlywiki-com
- Verify the version numbers in $:/config/OfficialPluginLibrary in
core/wiki/config/OfficialPluginLibrary.tid
- Move the latest release note from the prerelease edition into the tw5.com edition
- Adjust the release date and the released field of the latest release tiddler (eg, Release 5.1.3)
- Also adjust the github.com comparison link to point to the tag for the new release
- Adjust the tiddler TiddlyWiki Archive to include the new version number
- Ensure TiddlyWiki Releases has the new version as the default tab
- Adjust the modified time of HelloThere
- Make sure master is fully committed
Update Readmes and release note
- Edit
package.json
to the new version number - Run
./bin/readme-bld.sh
to build the readme files - Commit the new readme files to master
- Restore
package.json
to the previous version number - Adjust the link for "GitHub for detailed change history of this release" in the release note
- Add the credits for the new release banner to the release note, including a link to the GitHub instance of the image from the commit history
Make New Release
- Run
./bin/verbump "5.1.3"
(substituting the correct version number) to update the version number and assign it a tag - Run
./bin/npm-publish.sh
to publish the release to npm - Verify that the new release of TiddlyWiki is available at https://www.npmjs.org/package/tiddlywiki
Update tiddlywiki.com release
- Update tiddlywiki-com from master and push to GitHub
- Wait until https://tiddlywiki.com is updated with the new release
Announcements
- Announce the new release on TalkTW
Preparation for the next release in master
- Adjust version number in
package.json
- Adjust version number in
bin/build-site.sh
- Adjust version number in $:/config/OfficialPluginLibrary (both in
editions/tw5.com
andeditions/prerelease/tiddlers/system
) and $:/config/LocalPluginLibrary - Create temporary new release banner
- Create the release note for the new release
- Commit changes to master and push to GitHub
Releasing new content for TiddlyWiki
To update https://tiddlywiki.com with new content, make a Pull Request with the updated tiddlers to the tiddlywiki-com
branch. As soon as the PR is merged, the Continuous Deployment system will automatically rebuild the site.
Note that the PR should only include updates within the editions
folder of the repo.