Skip to content

Commit

Permalink
Merge pull request #120 from hercules-ci/improvements
Browse files Browse the repository at this point in the history
Improvements
  • Loading branch information
roberth authored Feb 16, 2023
2 parents 0cc800c + 5ada97c commit fdbc15b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
9 changes: 8 additions & 1 deletion effects/effect/effect.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ let
jq
];

mkDrv = args: stdenvNoCC.mkDerivation (args // {
mkDrv = args:
let
mkDerivation =
lib.throwIf (args?imports) "`mkEffect` does not support `imports`. Did you mean `modularEffect` instead of `mkEffect`?"
stdenvNoCC.mkDerivation;

in mkDerivation (args // {


phases = args.phases or "initPhase unpackPhase patchPhase ${args.preGetStatePhases or ""} getStatePhase userSetupPhase ${args.preEffectPhases or ""} effectPhase putStatePhase ${args.postEffectPhases or ""}";

Expand Down
4 changes: 4 additions & 0 deletions effects/modules/git-auth-gh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ let
cfg = config.programs.gh;
in
{
imports = [
./git-auth.nix
];

options = {
programs.gh.enable = lib.mkOption {
description = ''
Expand Down
8 changes: 8 additions & 0 deletions flake-modules/github-pages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ in
# deploy
{
${cfg.pushJob}.outputs.effects.gh-pages =
lib.throwIf (cfg.branch == "gh-pages") ''
The option `hercules-ci.github-pages.branch` refers to the branch
that serves as a source for the GitHub Pages deployment. You've set
it to "gh-pages" which is the output. You'll probably want to
specify a branch like your default branch, such as "main", "develop"
or "master", or some other branch that isn't occupied by the build
output.
''
lib.optionalAttrs
(herculesCI.config.repo.branch == cfg.branch)
deploy;
Expand Down

0 comments on commit fdbc15b

Please sign in to comment.