The Samizdat.toml
manifest
When you create a new SAMIZDAT project with samizdat init
, you automatically get a file in your directory called Samizdat.toml
. This file controls how the SAMIZDAT CLI will manage the series associated with your project. This article is an overview on the file an how you can use it in your workflow.
Profiles
The SAMIZDAT works on two profiles (i.e., modes): build and release. This is drectly reflected in the structure of Samizdat.toml
: there is a series
section for release settings and a debug
section for debug settings. SAMIZDAT isolates both kinds of builds in different series, each with its own keypair. As the name implies, debug
builds are meant for local development only and are not for public consumption. Objects generated from the debug build are marked as draft
and therefore are not accessible to the SAMIZDAT network. Editions are also not anounced to the public. On the other hand, release
builds are the real-deal you expect: they are open to the world and new editions are anounced (unless explicitely silenced with the --no-annouce
flag on commit).
Profile sections: series
and debug
Both sections admit the same keys, which are:
- The name of the series owner (i.e., the public and private keypair).
- The public key corresponding to the target series.
- A time to leave: a suggestion of how much time a node should wait to poll again the network for new editions. This field is optional and defaults to the value
"1 hour"
.- In
debug
mode, you can set this value, but it has no effect.
- In
The build
section
The build
section defines how a new edition should be built. For this, you need to specify two keys:
- A folder containing the final structure of the contents that will form this edition under the key
"base"
. - An optional build script, which can be used to mount the output folder (e.g., running webpack or
npm run something
) under the key"run"
. For the build script, the following environment variables are set:SAMIZDAT_RELEASE
: is set to something not empty if inrelease
mode and to empty if indebug
node.
The .Samizdat.priv
private manifest
Finally, together with the Samizdat.toml
, a second file is generated when you call samizdat init
: .Samizdat.priv
. This file contains the private keys corresponding to both release and debug series. Since it contains only private information, it cannot be put in the main manifest and should be kept away from version control systems such as Git (we strongly recommend you to add it to your .gitignore
). Be careful with whom you share this file! Every person with access to its contents can create new editions of your series, essentially taking control of it irreversibly.
We will not ellaborate on the structure of the private manifest here, as there is no need to customize it. Since all it contains are the private keys, you may use it and pass it around as is.