Upgrading
Keeping your system up to date gets you the latest fixes, features and general improvements.
ENiGMA½ is published as releases, tagged vX.Y.Z (v0.7.0, v0.7.1, …), and as master, the edge, which carries every change as soon as it is merged. Most boards should run a release. See Versioning & Releases for what a version number promises: a patch release (0.7.0 to 0.7.1) only fixes things; a minor release (0.7.0 to 0.8.0) adds features and is where anything that needs action from you appears.
Before You Upgrade
Section titled “Before You Upgrade”- Back up your system. See Backing Up Your System.
- Read the Upgrade Notes for every version between yours and the one you are moving to, not just the last one. Each Action: entry is something you need to do. Release Notes covers what is new.
- If the Upgrade Notes say the required Node.js version went up, install it first.
Upgrading a Git Install
Section titled “Upgrading a Git Install”This covers the install script, manual and Windows installs, which are all git checkouts.
# stop the system if it is runningcd enigma-bbs# BACK UP YOUR SYSTEM, and read the Upgrade Notesgit fetch --tagsgit checkout v0.7.1 # the release you are moving tonpm ci# 1. look for any errors# 2. update any configuration or menus (see below)./main.js # restart the systemnpm ci installs exactly the packages the release was tested with, replacing node_modules as it goes, so there is no need to delete it by hand when Node.js changes. Git reports a “detached HEAD” after checking out a tag: that is expected.
If git checkout refuses because of local changes, you have edited files that ENiGMA½ ships (stock art or theme files, for example). Copy your changes aside, put the stock files back with git checkout -- <file>, and check out the release again. To avoid this next time, keep your customisations in your own files, such as a theme of your own, rather than editing the stock ones.
The release list, with each release’s notes, is on GitHub. git tag --list 'v*' shows the ones you have fetched.
Tracking master
Section titled “Tracking master”If you want changes before they are released, run master instead:
cd enigma-bbsgit checkout mastergit pullnpm cimaster is kept working, but it can carry unfinished features (switched off until they are done) and changes that have not been through a release’s checks. The Upgrade Notes for changes merged since the last release are under Unreleased; read them each time you pull. To go back to releases, check out the next release once it is out. Checking out an older release than the master you ran may need your backup restored, as above.
Upgrading a Release Archive Install
Section titled “Upgrading a Release Archive Install”If you installed from a release archive, your configuration, databases and other data live inside the program directory. Never unpack a new archive over an existing install: it overwrites any stock file you have edited, and leaves behind files the new version removed.
Upgrade side by side instead:
- Stop the system, back it up, and read the Upgrade Notes.
- Download and verify the new archive, and unpack it next to the old install, not into it.
- Copy your data from the old directory into the new one:
config/, which holdsconfig.hjson, your menus andsecurity/keys. Leave outconfig/achievements.hjsonunless you changed it: the release ships its owndb/file_base/, and any other file area storage you set up inside the installlogs/,mail/,userdata/anddrop/- your own mods in
mods/. The release ships a few stock files there (mods/themes/luciano_blocktronics/), so don’t copy those over the new ones - your own files in
www/andgopher/, andws-term/if you installed enig-term - any art or theme files you added under
art/. Stock files you edited need merging with the new release’s versions, not copying over them (see below)
- In the new directory, run
npm ci(ornpm ci --omit=dev). - Merge in menu and theme changes as described below, then start the new version.
Keep the old directory until you are happy with the new one. If you set paths in config.hjson that point outside the install, those need no copying. If you changed paths to point inside the old install, update them.
Upgrading Docker
Section titled “Upgrading Docker”-
Back up your volumes and read the Upgrade Notes, doing what each Action: entry says. See Backing Up Your System.
-
Pull the image tag you run and recreate the container. See Docker for the tags. Add
-e ENIGMA_STOCK_FILES=copy-missingif you want stock files your volumes lack (step 3) copied in as it starts. -
Check the container’s start-up log. It says how many of the new release’s stock
art,configandmodsfiles (andwww, if you mount it) your volumes lack, such as the art for a new feature, or which ones it copied in withcopy-missing; files you have are never touched. A stock file you have is never updated either, since yours may be an edit, so compare yours with the new release’s, which the image keeps in/enigma-bbs-pre:Terminal window docker exec ENiGMABBS diff -ru /enigma-bbs-pre/art /enigma-bbs/artdocker cp ENiGMABBS:/enigma-bbs-pre ./enigma-stock-X.Y.Zdocker cp ENiGMABBS:/enigma-bbs/misc ./enigma-stock-X.Y.Z/miscenigma-stock-X.Y.Zthen holds the stockart/,config/,mods/andwww/, plus themisc/templates. See Stock files after an upgrade. -
Merge the new files into your volumes as described in Configuration File Updates below, then restart the container.
Configuration File Updates
Section titled “Configuration File Updates”After an upgrade, it is possible that your system is missing new features exposed in the default theme/menu layout. To check this, you can look at the template menu files in misc/menu_templates, and config_template.in.hjson as well as the default luciano_blocktronics/theme.hjson files for changes/additions.
For a Docker install, compare your volumes with the stock files you copied out above. To see exactly what changed in the templates between two releases on a git install:
git diff v0.7.0 v0.8.0 -- misc/menu_templates misc/config_template.in.hjson art/themes/luciano_blocktronics/theme.hjson- Create a clean install of the new version next to yours (a fresh checkout via
git clone https://github.com/NuSkooler/enigma-bbs.git enigma-bbs-clean, or an unpacked release archive) and run it to see any new features within the default configuration! - As the template files described above are likely what you built your system from, a visual diff viewer such as DiffMerge (free, works on all major platforms) can be very helpful for the tasks outlined above!
Which Version Am I Running?
Section titled “Which Version Am I Running?”Any of these shows it:
./main.js --versionor./oputil.js --version- The Waiting For Caller (WFC) screen
- The
%VN(and%VL) MCI codes, wherever your art uses them - The log, at startup
What the version means:
| Version | Means |
|---|---|
0.7.0 | Exactly that release: a git checkout of the v0.7.0 tag, or a release archive or Docker image of it. |
0.7.0-14-gabc1234 | A git checkout 14 commits after 0.7.0, at commit abc1234. You are tracking master, or another branch. |
0.6.3-beta-gabc1234 | A git checkout with no release tag in its history, at commit abc1234. You will see this on master until the first release is tagged. |
...-dirty on any of these | Files that ENiGMA½ ships have been edited in your checkout. git status lists them. |
An install that is not a git checkout, such as a release archive, reports the version in its package.json. A Docker image reports the version it was built from.
Something Went Wrong!
Section titled “Something Went Wrong!”See Installation & Upgrade Issues, which covers native module compile failures and the menu and theme entries an upgrade can leave behind.
If you need to go back to the version you had, restore your backup and check out (or unpack) that version again.