Skip to content

Commit

Permalink
Enforce with constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Oct 24, 2021
1 parent 34f2e32 commit 740f4e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions constraints.pro
Expand Up @@ -4,6 +4,12 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:*', 'devDepend
% Only consider dependency ranges that start with 'workspace:'
atom_concat('workspace:', _, DependencyRange).

% Enforces that all workspaces depend on other workspaces using `workspace:^` in dependencies
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, 'workspace:^', 'dependencies') :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies'),
% Only consider dependency ranges that start with 'workspace:'
atom_concat('workspace:', _, DependencyRange).

% Enforces the license in all public workspaces while removing it from private workspaces
gen_enforced_field(WorkspaceCwd, 'license', 'MIT') :-
\+ workspace_field(WorkspaceCwd, 'private', true).
Expand Down

0 comments on commit 740f4e5

Please sign in to comment.