Repository navigation
Releases
Releases · armcknight/templatr
v3.1.0
Added
- The swift-cli component, for a SwiftPM command line tool:
make cli install,patchanddeploy, version and changelog files, CI, and a cask or GitHub release workflow. - A manifest's
[detect]can havenonerules, which no file may match; it needs thetemplatrcommand release that reads them, so release the command first.
2.2.0
Added
templatr bootstrapandcheckread a manifest's[detect]nonerules, and do not detect a component when one matches.
Changed
- The repository is bootstrapped with its own swift-cli component.
make cli build,test,install,uninstall,patch,minor,major,deployanddeploy-betareplace the root Makefile's targets of those names, andmake cli installputs the dev build in Homebrew's bin, over the cask's link, in place of~/.local/bin. The--templateshelp namesmake cli install. templatr bootstrapsets the release workflow'sMATCH_PASSWORD,MATCH_DEPLOY_KEY,NOTARY_KEY,NOTARY_KEY_IDandNOTARY_ISSUER_IDsecrets from the owner's Keychain, as the swift-cli component declares them. 2.1.1 never reached the Homebrew cask: its release run failed before those secrets were set. This release is the first in the tap with a signed and notarized binary.
v3.0.1
Changed
- The apple-app and vapor-fly components' human steps for the App Store
Connect API keys and the Fly deploy token nametemplatr store-secrets,
with its flags, in place of the templatr checkout'sbin/store-secrets,
which templatr 2.0.0 removes.
v3.0.0
Added
- The github-repo component's
privateinput,falseby default, which
templatr bootstrap --privaterecords astrue: the owner keeps the
repository private and accepts that GitHub's free plan has no rulesets for
it. Then therulesets-availablestep does not run, so it is not a step for
a person.
Changed
- The supabase component needs
SUPABASE_ACCESS_TOKENand
SUPABASE_DB_PASSWORDonly when itsmigration_styleiscli, with the
manifests' newwhen. Afluentproject no longer gets them as missing
secrets or steps for a person, or in its README.
Fixed
- The apple-app component's
app-recordandtester-groupchecks run with
rbenv execwhen rbenv is installed. They run with/bin/sh, whose PATH
has no rbenv shims, sobundle execused another Ruby than the project's,
could not load its bundle, and the checks reported the app record and the
tester group as missing.
2.1.1
Fixed
- The cask's binary is signed with the Developer ID certificate and notarized,
as tools, workr and superlinear are. 2.1.0's was not.
2.1.0
Added
templatris a Homebrew cask in armcknight/homebrew-tools:
brew install --cask armcknight/tools/templatr. Each release tag builds the
binary and bumps the cask through armcknight/workflows'
swiftpm-cask-release.yml. The cask'stemplatrkeeps a clone of this
repository in~/Library/Application Support/templatr/templates, made on
first use, with its tags fetched on each run, and checked out at the newest
alias, so the components it reads are a release's;--templatesand--tag
choose another checkout or release. A build from a checkout, with
swift runormake install, uses that checkout as before.make uninstallremoves the dev build from~/.local/bin, so that the
cask'stemplatrruns again.
v2.0.0
Added
- The static-site component: a website in
site/, built with Jekyll, Hugo,
Vite or nothing, served from a private S3 bucket through CloudFront. One
CloudFormation template,components/static-site/cloudformation/site.yml,
owns the bucket, the certificate, the distribution (with the managed
security headers, a 404 page, and a viewer-request function for directory
indexes, the trailing-slash redirect and the www redirect) and the DNS
records; thehosting-stackstep deploys it, andtemplatr checkcompares
the stack with it.make/static-site.mkhasbuild,serve,
endserve,deploy,bust-cache,invalidations,stackandstatus.
make site deployrefuses uncommitted changes, uploads the build, clears
CloudFront, and commitssite/DEPLOYED, the commit that is live, as
deploy(site): <commit>;https://<domain>/DEPLOYEDis the same file. The
scaffold'ssite/README.mdis the checklist of what a site needs before
and after it is deployed: titles, descriptions, canonical links, Open Graph
tags, icons,404.html,robots.txt, the sitemap, Search Console, Bing,
the link-preview debuggers and the quality checks. Old domains in the
redirect_frominput, such asarmcknight.com tworingsoft.com, each get a
stack fromredirect.yml: a certificate for the domain and its www, and a
distribution whose function answers every request with a permanent redirect
to the same path on the site;make site redirectsmakes them, and
templatr checkchecks them and that each domain redirects. The manifest's
sharedpieces have a new kind,template. - The linear-workspace component links the Linear workspace from the README's
"Further reading". Its new inputlinear_workspaceis the workspace's URL
key, the path afterlinear.app/, which its script reads from the API with
print workspacewhen the key is in the environment. A project that already
uses the component gets the input on its nextbootstrap. - The root Makefile downloads its fragments to
.templatr/make/, next to the
components'CLAUDE.mdcopies, and no longer to.superlinear/make/. The
base component's.gitignorecheck and fix follow. A project with the old
directory can delete it: the fragments download again on first use. - The root README's "How this project is built" section sits between
<!-- templatr:begin how-this-is-built -->and<!-- templatr:end -->, the
same family as the component sections, and no longersuperlinear:begin. A
README that has the old markers must be edited, or bootstrap adds a second
section at its end. - The Keychain items that every component's secrets come from are named
templatr.<name>, such astemplatr.asc.key-idand
templatr.fly.<app>.deploy-token, and no longersuperlinear.<name>. An
item stored under the old name must be moved by hand:securityhas no
rename, so read it withfind-generic-password -w, add it under the new
name, and delete the old one. - The
mcknight-io-listingcomponent, for a project listed on mcknight.io's
projects page: theSITE_DISPATCH_TOKENrepository secret, a fine-grained
personal access token for armcknight/mcknight.io only, from the Keychain item
templatr.mcknight-io.dispatch-tokenand made again each year, and a step
that checks that each job that calls a workflow in armcknight/workflows has
secrets: inherit, so that the shared workflows' notify step can ask the
site to refresh. It is opt-in: it is detected only when.templatr.toml
lists it. - The
apple-appcomponent'sASC_ADMIN_KEY_ID,ASC_ADMIN_ISSUER_IDand
ASC_ADMIN_KEY_P8_BASE64local secrets: the App Store Connect API key with
the Admin role, which match needs to make or renew certificates and
profiles.templatr checkreports them as missing until they are in the
Keychain.
Changed
- The apple-app component's
app_nameis the name people see, which can have
spaces, such asBae Today: it is inferred from the display name
(INFOPLIST_KEY_CFBundleDisplayName, elseAPP_DISPLAY_NAME) before
PRODUCT_NAME. The staging IPA,apple/fastlane/Fastfile's
APPLE_APP_NAMEand a new app'sPRODUCT_NAMEare the name without spaces,
and a new app's display name is the name as given. The sharedstagelane
also removes spaces fromAPPLE_APP_NAME. A project whose name has no
spaces changes nothing. - The
make/*.mkfragments write their logs to alogs/directory in the
component's directory, such asapple/logs/deploy-beta-44.logand
server/logs/vapor-fly-deploy-abc1234.log, and no longer next to the
project files. The scaffolds'.gitignorefiles ignorelogs/, and the
supabase component'sgitignorestep checks for it.APPLE_APP_LOG_DIR,
VAPOR_FLY_LOG_DIRandSUPABASE_LOG_DIRchange the directory.
2.0.0
Changed
bin/store-secretsis now the subcommandtemplatr store-secrets, with the
same flags, so it runs from the installed command in any directory, and no
longer from a checkout of this repository.--checkrunstemplatr check
directly, notswift run. The apple-app and vapor-fly manifests' human
texts name the subcommand with its flags.
Removed
bin/store-secrets.
1.1.0
Added
- A manifest's secret or step can have
when, such as
{ input = "migration_style", equals = "cli" }: the component needs it only
when the input has that value. With another value,bootstrapandcheck
do not read, set, run or report it, and the README does not list it. The
validator rejects awhenwhose input the component does not declare. templatr bootstrapandchecktake--privateand--no-private: they
set the github-repo component'sprivateinput, whichbootstraprecords
in.templatr.tomlandcheckuses for that run only. Without either, a
repository is public, or keeps the recorded value.
Fixed
- A component's step and certificate commands get the values of its
local
secrets that are in the Keychain, in their environment. Before,templatr checkonly looked for the Keychain items, so apple-app'sapp-recordand
tester-groupchecks ran without the App Store Connect API key, stopped
with "Missing ASC_KEY_ID.", and were reported as steps for a person. A
variable that the environment already has, such as one from.envrc, keeps
its value. The values go only to the commands' environment, never to their
arguments or a report.
1.0.0
Added
templatr bootstrapsets a project up from its components, and
templatr checkreports what it still needs.- The Keychain items that
bootstrapandbin/store-secretswrite and read are
namedtemplatr.<name>, such astemplatr.asc.key-id, and no longer
superlinear.<name>. templatr --versionprints the version.- A manifest's
sharedpieces can be of the kindtemplate, such as the
static-site component's CloudFormation template. {{inputs.<name>.compact}}is an input's value without white space, for a
name people see, such asBae Today, where a file or an identifier needs
BaeToday.make installbuilds with the git commit in the version:templatr --version
prints0.1.0+<commit>, and.dirtywhen the working tree had changes. A
release build prints the version alone.make patch,minorandmajorbump the version, andmake deployand
make deploy-betatag a release and make its GitHub release.- A
detectorinferrule withroot = truereads from the repository root
instead of the component's directory, so that a component can be detected
and its inputs found from another part of the project. bin/store-secretsstores the App Store Connect API keys and the Fly deploy
tokens in the Keychain, under the item names that the manifests give.- A
build-settinginfer rule withseparatorreads a list setting, such as
SUPPORTED_PLATFORMS: it maps each word, drops a value that is already in
the list, and joins the values withseparator. templatr checkreports signing certificates, provisioning profiles and
other files that expire within 30 days, from a manifest's optional
certificates, whoselistcommand prints each one with its expiry. The
report's newcertificateExpirieshas them. Theapple-appcomponent lists
the certificates and profiles in the fastlane match repository.- An infer rule with
from = "command"takes an input's value from what a
shell command prints, for a value that is not in a file, such as one a
service's API gives. It runs in the component's directory, or at the root
withroot = true, with thetemplatesandtemplates.tagplaceholders
filled in. - A manifest's optional
linksare links to the project's own pages for the
component, such as its Linear workspace, with placeholders in their URLs.
bootstrapwrites them under "Further reading" in the README's section, and
leaves out a link whose input has no value. - The
supabasecomponent is detected from the root also, before its
supabase/exists: from aserver/Package.swiftwith
fluent-postgres-driver, or a.envrc.examplewith a Supabase host. It
infersproject_reffrom.envrc.example,fly_appfromserver/fly.toml,
productfromserver/Package.swift,ca_cert_pathfrom the certificate
thatserver/Dockerfilecopies, andca_cert_envfromserver/fly.toml's
[env].
Changed
templatr checkandbootstrapread only the templates' major-version
aliases, such asv1, and pin new components to the newest one;--tag
still takes a full tag, such asv1.0.1. A component is behind when a newer
alias exists, sov1is behindv2but notv1.0.1.