======================================================================== ........................................................................ 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. ========================================================================