[files] names the folder Bach packages and what to leave out of it. It’s required for a Windows installer. For a walkthrough, see Choose files.
bach.toml
source
Folder path, required, relative to bach.toml. Everything in it, including subfolders, is installed into the install folder with the same structure.
exclude
List of patterns, optional. Matching files are left out. * matches within one name, ** across folders, ? one character. A pattern without / matches file names in any folder; one with / matches from the top of source. Case doesn’t matter. The setup file being written is always left out.
allow_secrets
List of patterns, optional. Files that look like secrets but are meant to ship. Without it, such files stop bach check and bach build with a message naming the first one.
Files treated as secrets
By name, anywhere in the folder:.env,.env.*,*.env*.pfx,*.p12,*.pem,*.key,*.ppk,*.p8,*.snk,*.jks,*.keystore,*.kdbxid_rsa*,id_dsa*,id_ecdsa*,id_ed25519*,secring.gpg,trustdb.gpg*.tfstate,*.tfstate.*,*.tfvars,credentials,credentials.json,service-account*.json,serviceaccount*.json,local.settings.json,secrets.json.git-credentials,.npmrc,.yarnrc.yml,.pypirc,.netrc,.aws-credentials,.htpasswd,.dockercfg,.pgpass,.vault-token,.bash_history,.zsh_history,wallet.dat- a file called
.git bach.tomlandbach-*.toml
.git, .svn, .hg, .ssh, .aws, .azure, .gnupg, .docker, .kube or .terraform, and .m2/settings.xml, .m2/settings-security.xml, .gradle/gradle.properties, .gem/credentials, .config/gcloud/**, .config/gh/hosts.yml.
By content: text files up to 256 KB with the extensions json, yml, yaml, toml, ini, cfg, conf, config, properties, txt, xml, env, pem, ps1, sh, bat or cmd are checked for a private key, an AWS access key, a GitHub token or a Slack token. Programs and libraries aren’t read.
Warnings
- Files that rarely belong in an installer:
*.pdb,*.log,.DS_Store,Thumbs.db, and anything innode_modules,targetor__pycache__folders. - A file whose installed path would be longer than 259 characters, based on the usual install folder with a 20-character user name.
- A file list of more than about 2 MB (roughly 17,000 files).
Folder rules
app.executablemust be in the folder and not excluded.- At least one file.
- No symbolic links.
- No two files whose names differ only in case.
- No
uninstall.exeat the top. - Names Windows can create: at most 255 characters, no reserved device names such as
NULorCOM1.
[[components]].