By default, 'doom ci deploy-hooks' would deploy Doom's git hooks in
$EMACSDIR (~/.emacs.d/.git/hooks). Now it deploys in the local repo its
run in. This is part of an effort to generalize Doom's CI for use
outside this repo.
Ref: 4bae9ffa47
Continues from 47d1b82 as part of an effort to generalize Doom's CI for
use outside this repo:
- 'doom ci ...' commands now:
- Run in the context of the local repo where they're run, rather than
from Doom's install directory ($EMACSDIR).
- Load the first of $REPO_ROOT/.github/ci.el, $DOOMDIR/cli.el, or
$DOOMDIR/cli.el, before executing CI commands. This allows for
per-project configuration, for example:
- https://github.com/doomemacs/doomemacs/blob/master/.github/ci.el
- https://github.com/doomemacs/themes/blob/master/.github/ci.el
(Details may change post-3.0)
- Scopeless commit types are now enforced in `doom-cli-commit-scopes`,
rather than `doom-cli-commit-rules`. This lets you specify exceptions,
like 0597466261.
- `doom-cli-commit-scopes` now supports sub-lists, as an easy way to
permit type-local scopes. E.g. To allow 'install' and 'faq' scopes
only for 'docs:' commits.
(add-to-list 'doom-cli-commit-scopes '(docs "install" "faq"))
These sublists accepts predicates too.
- Fixed the link to git conventions in the linter's failure/warning
output, to point to our Discourse post.
Ref: https://github.com/doomemacs/doomemacs/blob/master/.github/ci.el
Ref: https://github.com/doomemacs/themes/blob/master/.github/ci.el
Ref: 0597466261
Amend: 47d1b82382
When launching Doom via 'doom run', the child process inherits
bin/doom's environment. This change restricts this sub-environment to
the intended target: straight and its use of git.
Fix: #6320
I was discussing issues generating autoloads files from some packages
with someone on Discord, and they mentioned issues with
alphapapa/bufler.el, so I added doom-autoloads-excluded-files in
5d0f781062, and also added bufler to it by default. In hindsight, that
doesn't make much sense as a default when Doom and its modules don't
even install bufler (and even if they did, this shouldn't be done in
core).
Ref: 5d0f781062
So they don't interfere with straight in odd, unpredictable ways. If
you *really* know what you're doing, set DOOMGITCONFIG to the path of a
gitconfig file. This envvar may be renamed in the future, however.
Close: #5640
Co-authored-by: M. Yas. Davoodeh <Davoodeh@users.noreply.github.com>
- Simplify doom-info and doom/info.
- Remove doom/copy-buffer-contents (may be moved later, but atm not very
useful).
- Remove doom/am-i-secure (this will later be replaced with CLI
commands)
Reduce cases where native-comp procedures were executed in
non-native-comp contexts (somehow).
Also:
- Adds a NATIVECOMP constant for statically detecting the feature.
- Remove native-comp-* -> comp-* aliases (Emacs HEAD has long since
moved on from these).
- Add 'no-native-compile: t' to autoloads file.
The message simply test for the "not-a-version-yet" patch number and
displays an explanation to prepare users for raised error frequency and
having a backup version of Emacs if they do not want to deal with
issues.
This generalizes and cleans up the linter API so that it can be used in
other Doom projects (or CLI commands, like our WIP changelog generator).
Besides that, our git's commit conventions saw two changes:
- A new 'Amend' keyword, for indicating a commit corrects an earlier,
recent one. This should be used to omit (or merge) commits in the eyes
of the changelog generator.
- Trailers must now follow the 'KEY: VALUE' format, which is supported
OOTB by 'git interpret-trailers' and makes scraping them much eacher.
Before, omitting the colon was mandatory, this is no longer the case.
Other highlights:
- For linter rules: replaced :footer and :refs keys with :trailers (a
string->string alist). Invalid trailers will be left in BODY's tail.
- Added a linter for colon delimiters in commit trailers (along with
other formatting checks, like capitalization and one-per-line checks).
There weren't enough checks that we were truly in a native-comp build of
Emacs. Not the most elegant solution, but the CLI rewrite handles this
far better so it'll do for now.
Fix#5131
- Now counts and reports all commit references that aren't the correct
length, not just the first.
- Now reports all incorrect references, not just the first on each line.
- Linter wasn't failing on any invalid scopes due to logic error.
- Linter was failing to recognize module categories as valid
scopes (e.g. :lang, :ui, etc).
- Adds 'ci' and 'lib' as valid scopes.
This is more predictable, and is safe as a global default in CLI
sessions (but not in interactive ones). This indirectly fixes case
insensitivity in our commit linter rules.