Go to file
Aaron Suen 7b12f24b1d Upgrade deps, fix package lock 2022-04-11 09:49:10 -04:00
.cdbrelease.template.lua Try to debug JSON parsing failure 2021-09-10 08:08:00 -04:00
.dockerignore Docker config, add a TODO file. 2019-11-02 12:43:26 -04:00
.gitignore New project. 2019-02-09 00:02:19 -05:00
.jsbeautifyrc Code cleanup 2021-02-27 11:23:33 -05:00
.jshintignore Beautify, code standards. 2020-03-27 22:22:51 -04:00
.jshintrc Code cleanup 2021-02-27 11:23:33 -05:00
.luacheckrc Saner file reading API 2020-03-28 07:54:08 -04:00
.lualocals Beef up lua hook, more extensive JSON support. 2020-03-27 22:06:00 -04:00
Dockerfile Docker config, add a TODO file. 2019-11-02 12:43:26 -04:00
LICENSE New project. 2019-02-09 00:02:19 -05:00
README Metadata editing, releasing via the API 2021-02-27 11:20:52 -05:00
cdbedit.js Fix metadata editing 2021-02-27 14:25:00 -05:00
cdbfetch.js Expanded debugging 2021-06-24 22:02:38 -04:00
cdbrelease.js Add support for advzip 2021-12-22 16:13:27 -05:00
cdbscreens.js Fix optional JSON configs 2021-02-28 08:27:05 -05:00
config.js Enable video URL editing 2022-04-05 21:12:57 -04:00
gitlua.js Try to debug JSON parsing failure 2021-09-10 08:08:00 -04:00
gitmirror.js Metadata editing, releasing via the API 2021-02-27 11:20:52 -05:00
icon.xcf Add project icon. 2019-03-29 06:29:48 -04:00
index.js Fix optional JSON configs 2021-02-28 08:27:05 -05:00
luahook.lua Oops 2021-09-10 08:25:30 -04:00
mylog.js Metadata editing, releasing via the API 2021-02-27 11:20:52 -05:00
package-lock.json Upgrade deps, fix package lock 2022-04-11 09:49:10 -04:00
package.json Upgrade deps, fix package lock 2022-04-11 09:49:10 -04:00
spawn.js Metadata editing, releasing via the API 2021-02-27 11:20:52 -05:00
withtemp.js Metadata editing, releasing via the API 2021-02-27 11:20:52 -05:00

README

========================================================================

........................................................................
Prerequisites:

- You must have an existing account on content.minetest.net, and must
  have an API Token configured.
- You must have already setup your package; this script will not create
  new packages for you.
- Your package must use VCS for release, and have the source repo URL
  already registered; file upload is not supported here.

........................................................................
Installation:

- Have nodejs (and npm if packaged separately) installed.
- Clone/download the project.
- Run "npm i" in the project dir to install dependencies.

........................................................................
Configuration:

Configuration is read from the following sources, from high to low
priority (highest priority overrides all others):
- command line options
- git repository .cdbrelease.lua
- git repository .cdb.json
- local .cdbrelease.json config file
- internal defaults
Note that settings that are used to locate other sources of config (e.g.
the config file path or git repository url) can only be meaningfully
defined in config sources that are available before those sources have
been loaded.  Settings become available in the order:
- internal defaults
- command line options
- local .cdbrelease.json config file
- git repository .cdb.json
- git repository .cdbrelease.lua

Recognized settings:
- conf: path to local config file, default' ~/.cdbrelease.json'.
- srcrepo: REQUIRED path or URL to a git repository from which to create
  the release; must have access to clone.  Note that this may be
  different from the "repo" setting, which is used for the published
  repo in the package metadata.
- branch: git ref/branch/tag from the source repo to release, defaults
  to master.
- execgit: path to execute git command, default 'git' (using $PATH)
- exectar: path to execute tar command, default 'tar' (using $PATH)
- execlua: path to execute lua 5.1 command, default 'lua5.1'
  (using $PATH)
- cdbjson: enable this option to enable processing configuration from
  the .cdb.json file embedded inside the repo.  WARNING: only do this if
  you trust the repository; any setting can be defined in the file.
- cdbjsonpath: relative path to .cdb.json within git checkout/export,
  default '.cdb.json'.
- cdblua: enable this option to enable processing dynamic lua config
  from inside the repo; a lua script embedded in the repo will be
  EXECUTED and can return config values.  WARNING: only do this if you
  trust the repository highly, and you're running adequately sandboxed
  (e.g. VM/container); any setting can be defined, and arbitrary code
  will be executed.
- cdbluapath: relative path to .cdbrelease.lua within the git
  checkout/export, default '.cdbrelease.lua'.
- root: root URL of CDB API, default 'https://content.minetest.net/api'
- token: REQUIRED CDB API authentication token.
- user: username of package owner, defaults to username associated with
  the API token.
- pkg: name of the package to release/edit.
- version: version of package to release, default none; if not set, then
  no release will happen (but edits/screenshots can still apply).
- edit: enable automatic modification of package metadata (default
  disabled)
- timeout: timeout (in seconds) for all CDB HTTP requests, default 60.
- force: if enabled, always create a new CDB release, even if one with
  a matching title exists (assume the existing one may be corrupt).

In addition, all keys supported by the package metadata PUT request
(https://github.com/minetest/contentdb/blob/master/app/flatpages/help/api.md#packages)
are supported, and used in package metadata editing.

========================================================================