Skip to content

Commit

Permalink
fix: custom project release config is required twice
Browse files Browse the repository at this point in the history
  • Loading branch information
seibert-io committed Feb 1, 2021
1 parent b2341a7 commit 3f092e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/base/semantic-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import * as appRoot from 'app-root-path';
import * as semanticRelease from 'semantic-release';

function getSemanticReleaseOptions(): semanticRelease.Options {
// eslint-disable-next-line global-require,import/no-dynamic-require
const baseOptions: semanticRelease.Options = require(path.resolve(__dirname, '../../release.config.base.js')); // eslint-disable-line @typescript-eslint/no-var-requires
const localOptionsFilename: string = `${appRoot}/release.config.js`;

return fs.existsSync(localOptionsFilename) ? require(localOptionsFilename) : baseOptions;
return fs.existsSync(localOptionsFilename) ? {} : baseOptions;
}

export { getSemanticReleaseOptions };

0 comments on commit 3f092e6

Please sign in to comment.