bitburner-src/tools
Martin Fournier 078a62cb0d Add npm version support to build releases
Replaces the `npm run allbuild` script with the `npm version` command.
It creates a new commit with a standardized message & includes the built
app.

Usage: `npm version [patch | minor | version | 10.0.0 | etc]`

Will update the package.json & perform a bunch of steps in a row:

- Runs `npm install` in:
  - The root directory
  - The ./electron/ directory
  - The ./tools/bump-version/ directory
- Runs `npm run test`
- Update the version string in:
  - ./electron/package.json (version)
  - ./src/Constants.ts (VersionString)
  - ./doc/source/conf.py (version & release)
- Runs `npm run doc` (build the markdown documentation)
- Runs `npm run build` (production build)
- Runs `npm run electron` (electron build)
- Runs `git add --all`
- Runs `git push -u origin dev && git push --tags`
2022-04-07 07:50:47 -04:00
..
bump-version Add npm version support to build releases 2022-04-07 07:50:47 -04:00
engines-check fmt and lint 2022-04-06 19:30:08 -04:00
fetch-changelog fmt and lint 2022-04-06 19:30:08 -04:00
build-release.sh Add npm version support to build releases 2022-04-07 07:50:47 -04:00
fetch-steam-achievements-data.js fmt and lint 2022-04-06 19:30:08 -04:00
pretty-save.js fmt and lint 2022-04-06 19:30:08 -04:00
README.md fmt and lint 2022-04-06 19:30:08 -04:00

Tools

Pretty Save

Useful to analyze a player's save game for anomalies.

It decodes the save and prettifies the output. Canno be used to modify a save game directly since it drops some properties.

Usage

node ./pretty-save.js 'C:\\Users\\martin\\Desktop\\bitburnerSave_1641395736_BN12x14.json' 'C:\\Users\\martin\\Desktop\\pretty.json'

Fetch Steam Achievements Data

Used to synchronize the achievements info in steamworks to the game's data.json

Usage

# Get your key here: https://steamcommunity.com/dev/apikey
node fetch-steam-achievements-data.js DEVKEYDEVKEYDEVKEYDEVKEY

Fetch Changelog

Used to generate a changelog of merged pull requests & commits between A & B. The key is a personnal access token, from https://github.com/settings/tokens. It requires the "gist" scope as the result is pushed to a secret gist.

Usage

cd ./tools/fetch-changelog
npm install
export GITHUB_API_TOKEN=tokenhere # this could go into your .bashrc or .profile etc.
node index.js --from=31ebdbb139981a604bd0e8fc1e364916762e11b9 > ../bump-version/changes.md

Bump Version

Used to update the game's various version identifier. Requires pandoc installed to convert .md to .rst

Usage

cd ./tools/bump-version
npm install
node index.js --version=1.10.3 --versionNumber=10 < changes.md