Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lamarios committed Jan 12, 2024
1 parent 5468e54 commit 0be1f5c
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ let
ci = ci;
pkgs = pkgs;
};
aliases = [
{
name = "build-runner";
command = "dart run build_runner build";
description = "Run code generation once";
}
{
name = "build-runner-watch";
command = "dart run build_runner watch";
description = "Watch for changes and run code generation";
}
];


in
Expand All @@ -23,13 +35,26 @@ pkgs.mkShell {
# clipiousNix.prepareShell is a helper function to sort things properly. It returns a string so it's possible to just concatenate stuff afterwards
# to run CI or DB migrations
shellHook = (clipiousNix.prepareShell {}) + ''
echo "Setting up submodules"
git submodule init
git submodule update
# setup/update pre-hook commits
echo "Setting up pre-commit hook"
dart run tools/setup_git_hooks.dart
''
;
"Adding flutter submodule to path"
export PATH="./submodules/flutter/bin:$PATH"
echo "creating useful aliases..."
''+
pkgs.lib.concatStrings (map (x: ''alias ${x.name}="${x.command}";'') aliases)
+''
echo -e "\nAll done 🎉 \nAvailable aliases:"
''+
pkgs.lib.concatStrings (map (x: ''echo "${x.name}: ${x.description}";'') aliases);



####################################################################
Expand Down

0 comments on commit 0be1f5c

Please sign in to comment.