Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Allow specifying no CI provider #10453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 8 additions & 2 deletions blueprints/addon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,15 @@ module.exports = {
.files(options)
.filter((file) => !['types/ember-data/types/registries/model.d.ts'].includes(file));
let addonFilesPath = this.filesPath(this.options);
let ignoredCITemplate = this.options.ciProvider !== 'travis' ? '.travis.yml' : '.github';
let ignore = [];
if (this.options.ciProvider !== 'travis') {
ignore.push('.travis.yml');
}
if (this.options.ciProvider !== 'github') {
ignore.push('.github');
}

let addonFiles = walkSync(addonFilesPath, { ignore: [ignoredCITemplate] });
let addonFiles = walkSync(addonFilesPath, { ignore });

if (options.packageManager !== 'pnpm') {
addonFiles = addonFiles.filter((file) => !file.endsWith('.npmrc'));
Expand Down
4 changes: 3 additions & 1 deletion blueprints/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ module.exports = {
let files = this._super();
if (options.ciProvider !== 'travis') {
files = files.filter((file) => file !== '.travis.yml');
} else {
}

if (options.ciProvider !== 'github') {
files = files.filter((file) => file.indexOf('.github') < 0);
}

Expand Down
4 changes: 4 additions & 0 deletions lib/tasks/interactive-new.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ class InteractiveNewTask extends Task {
name: 'Travis CI',
value: 'travis',
},
{
name: 'None',
value: 'none',
},
{
name: 'Ignore/Skip',
value: null,
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/help/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
type: ['travis', 'github', 'none'],
default: 'github',
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false
},
{
Expand Down Expand Up @@ -462,9 +462,9 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
type: ['travis', 'github', 'none'],
default: 'github',
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false,
},
{
Expand Down Expand Up @@ -593,8 +593,8 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
type: ['travis', 'github', 'none'],
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false,
},
{
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/help/with-addon-blueprints.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
type: ['travis', 'github', 'none'],
default: 'github',
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false
},
{
Expand Down Expand Up @@ -494,9 +494,9 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
type: ['travis', 'github', 'none'],
default: 'github',
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false,
},
{
Expand Down Expand Up @@ -625,8 +625,8 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
type: ['travis', 'github', 'none'],
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false,
},
{
Expand Down
12 changes: 6 additions & 6 deletions tests/fixtures/help/with-addon-commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
type: ['travis', 'github', 'none'],
default: 'github',
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false
},
{
Expand Down Expand Up @@ -462,9 +462,9 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
type: ['travis', 'github', 'none'],
default: 'github',
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false,
},
{
Expand Down Expand Up @@ -593,8 +593,8 @@ module.exports = {
{
name: 'ci-provider',
key: 'ciProvider',
type: ['travis', 'github'],
description: 'Installs the default CI blueprint. Either Travis or Github Actions is supported.',
type: ['travis', 'github', 'none'],
description: 'Installs the optional default CI blueprint. Either Travis or Github Actions is supported.',
required: false,
},
{
Expand Down