Skip to content

Commit

Permalink
chore: instrument releases with cog
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Apr 17, 2023
1 parent 0cae039 commit fc19938
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
result

# nixago: ignore-linked-files
cog.toml
adrgen.config.yml
.conform.yaml
treefmt.toml
lefthook.yml

# nixago-auto-created: mdbook-build-folder
docs/book/**
docs/book/**
28 changes: 28 additions & 0 deletions cells/_automation/configs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@
inherit (inputs.cells) std presets;
l = nixpkgs.lib // builtins;
in {
cog = {
output = "cog.toml";
commands = [{package = nixpkgs.cocogitto;}];
data = {
tag_prefix = "v";
branch_whitelist = ["main" "release/**"];
ignore_merge_commits = true;
pre_bump_hooks = [
''git switch -c "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"''
"echo {{version}} > ./VERSION"
];
post_bump_hooks = [
''git push --set-upstream origin "$(echo "release/{{version}}" | sed 's/\.[^.]*$//')"''
"git push origin {{version}}"
"cog -q changelog --at v{{version}}"
"git switch main"
"echo {{version+minor-dev}} > ./VERSION"
"git add VERSION"
];
changelog = {
path = "CHANGELOG.md";
template = "remote";
remote = "github.com";
repository = "std";
owner = "divnix";
};
};
};
treefmt = {
data = {
global.excludes = [
Expand Down
1 change: 1 addition & 0 deletions cells/_automation/devshells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ in
(lib.cfg.githubsettings cell.configs.githubsettings)
lib.cfg.lefthook
lib.cfg.adrgen
(lib.dev.mkNixago cell.configs.cog)
];
commands =
[
Expand Down

0 comments on commit fc19938

Please sign in to comment.