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.
https://tiddlywiki.com is served by GitHub Pages from the repository https://github.com/Jermolene/jermolene.github.io
The scripts live in the repository https://github.com/Jermolene/build.jermolene.github.io
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/Jermolene/jermolene.github.ioTiddlyWiki5
- a local copy of the repo https://github.com/Jermolene/TiddlyWiki5
The scripts are designed to be executed with the current directory being the TiddlyWiki5
directory.
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"
}
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
)
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
Builds the readme files for the TiddlyWiki5
and build.jermolene.github.io
repos using the released version of TiddlyWiki specified in package.json
.
Builds the tiddlywiki.com/prerelease
target files using the latest TiddlyWiki prerelease code and special prerelease edition for the content.
Pushes the latest changes to the jermolene.github.io
directory to GitHub.
Builds the dev prerelease edition.
Builds the prerelease prerelease edition.
Builds the tw5tiddlyweb edition and uploads it to TiddlySpace.
Bumps the version number of the package.json
in the TiddlyWiki5
repo and applies the correct version tag to the repo.
Publishes the TiddlyWiki5
repo to npm.
Releasing a new version of TiddlyWiki
- 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)
- Ensure TiddlyWiki Releases has the new version as the default tab
- Adjust the modified time of HelloThere
- Make sure Jermolene/TiddlyWiki5 is fully committed
- Edit
package.json
to the new version number - Run
../build.jermolene.github.io/readme-bld.sh
to build the readme files - Commit the new readme files in
TiddlyWiki5
- Restore
package.json
to the previous version number - Run
../build.jermolene.github.io/verbump "5.1.3"
(substituting the correct version number) to update the version number, assign it a tag - Run
../build.jermolene.github.io/npm-publish.sh
to publish the release to npm - Update the
package.json
forbuild.jermolene.github.io
to the new version - Verify that the new release of TiddlyWiki is available at https://www.npmjs.org/package/tiddlywiki
- Change current directory to the
build.jermolene.github.io
directory - Run
npm install
to install the correct version of TiddlyWiki - Change current directory to the
TiddlyWiki5
directory - Run
../build.jermolene.github.io/bld.sh
to build the content files - Verify that the files in the
jermolene.github.io
directory are correct - Run
../build.jermolene.github.io/github-push.sh
to push the new files to GitHub - Run
../build.jermolene.github.io/tiddlyspace-upload.sh <username> <password>
to upload the release to TiddlySpace - Tweet the release with the text "TiddlyWiki v5.x.x released to https://tiddlywiki.com #newtiddlywikirelease"
- Preparation for the next release:
- Adjust version number in $:/config/OfficialPluginLibrary
- Adjust version number in https://github.com/Jermolene/build.jermolene.github.io in
prerelease-bld.sh
,bld.sh
andmake-library-bld.sh
Releasing new content for TiddlyWiki
- Change current directory to the
TiddlyWiki5
directory - Run
../build.jermolene.github.io/bld.sh
to build the content files - Run
../build.jermolene.github.io/readme-bld.sh
to build the readmes - Commit the readmes to
TiddlyWiki5
andbuild.jermolene.github.io
if necessary - Verify that the files in the
jermolene.github.io
directory are correct - Run
../build.jermolene.github.io/github-push.sh
to push the new files to GitHub