mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 21:42:49 +00:00
@@ -18,6 +18,10 @@ export interface Configuration {
|
||||
* Whether or not the project has a CLI
|
||||
*/
|
||||
hasCli: boolean;
|
||||
/**
|
||||
* A list of CI entries to ignore while checking
|
||||
*/
|
||||
ignoreCiEntries: string[];
|
||||
/**
|
||||
* A list of script names to ignore while checking
|
||||
*/
|
||||
@@ -411,6 +415,7 @@ export function getConfiguration(packageJson: any): Configuration {
|
||||
const defaultConfiguration: Configuration = {
|
||||
forPackaging: true,
|
||||
hasCli: true,
|
||||
ignoreCiEntries: [],
|
||||
ignoreScripts: [],
|
||||
serverSide: true,
|
||||
standardBuild: true,
|
||||
@@ -490,7 +495,7 @@ export function getRules(configuration: Configuration): Rules {
|
||||
];
|
||||
|
||||
// expected values in CI config
|
||||
const ciConfig = {
|
||||
const ciConfig: { [k: string]: any; } = {
|
||||
/* tslint:disable:object-literal-sort-keys */
|
||||
image: 'registry.gitlab.com/openstapps/projectmanagement/node',
|
||||
cache: {
|
||||
@@ -536,6 +541,10 @@ export function getRules(configuration: Configuration): Rules {
|
||||
/* tslint:enable */
|
||||
};
|
||||
|
||||
for (const ignoreCiEntry of configuration.ignoreCiEntries) {
|
||||
delete ciConfig[ignoreCiEntry];
|
||||
}
|
||||
|
||||
if (configuration.forPackaging) {
|
||||
scripts.prepublishOnly = 'npm ci && npm run build';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user