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

refactor!: drop platform binaries #1180

Merged
merged 24 commits into from
Nov 6, 2021
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8e57f52
test(create): remove create & build binary usage
erisu Nov 4, 2021
e1959a4
refactor!: remove create binaries
erisu Nov 4, 2021
7c4fe54
refactor!: remove build binaries
erisu Nov 4, 2021
f70692b
refactor: update platform
erisu Nov 4, 2021
335605f
chore: cleanup update platform error message
erisu Nov 4, 2021
2246228
refactor!: remove update binaries
erisu Nov 4, 2021
76cea59
refactor!: remove check_reqs binaries & usage
erisu Nov 4, 2021
9ae23d1
refactor!: remove clean binaries
erisu Nov 4, 2021
3e5ac4f
refactor!: remove run binaries
erisu Nov 4, 2021
0d6ef4f
refactor!: remove test binaries
erisu Nov 4, 2021
53bfd82
refactor!: remove log binaries
erisu Nov 4, 2021
8d29122
refactor: cleanup version binaries
erisu Nov 4, 2021
f13996e
refactor!: remove uncrustify binary & config
erisu Nov 4, 2021
5e153ad
refactor!: remove binary help methods for build & run
erisu Nov 4, 2021
4d99320
refactor!: remove version.bat binary
erisu Nov 4, 2021
57dea23
fix: get realpathSync of os tmp dir
erisu Nov 5, 2021
381ed72
refactor: cleanup verify create & build methods
erisu Nov 5, 2021
0808169
refactor(create.spec): use expectAsync toBeResolved
erisu Nov 5, 2021
d0e7d59
refactor!: remove uncrustify pre-commit hook
erisu Nov 5, 2021
e7e1877
refactor!: remove list-emulator-build-targets binary
erisu Nov 5, 2021
e3f4d15
refactor!: remove list-started-emulators binary
erisu Nov 5, 2021
cfaf4ff
refactor!: remove start-emulator binary
erisu Nov 5, 2021
6e50686
chore: cleanup eslint ignore
erisu Nov 5, 2021
f732de5
refactor!: remove bat files
erisu Nov 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions bin/check_reqs

This file was deleted.

25 changes: 0 additions & 25 deletions bin/check_reqs.bat

This file was deleted.

74 changes: 0 additions & 74 deletions bin/create

This file was deleted.

26 changes: 0 additions & 26 deletions bin/create.bat

This file was deleted.

18 changes: 0 additions & 18 deletions bin/lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,6 @@ function copyScripts (projectPath, projectName) {
const nodeModulesDir = path.join(ROOT, 'node_modules');
if (fs.existsSync(nodeModulesDir)) fs.copySync(nodeModulesDir, path.join(destScriptsDir, 'node_modules'));

// Copy the check_reqs script
fs.copySync(path.join(binDir, 'check_reqs'), path.join(destScriptsDir, 'check_reqs'));
fs.copySync(path.join(binDir, 'check_reqs.bat'), path.join(destScriptsDir, 'check_reqs.bat'));

// Copy the version scripts
fs.copySync(path.join(binDir, 'apple_ios_version'), path.join(destScriptsDir, 'apple_ios_version'));
fs.copySync(path.join(binDir, 'apple_osx_version'), path.join(destScriptsDir, 'apple_osx_version'));
Expand All @@ -95,7 +91,6 @@ function copyScripts (projectPath, projectName) {
// modules across both the repo and generated projects, we should make sure
// to remove/update this.
const path_regex = /templates\/scripts\/cordova\//;
utils.replaceFileContents(path.join(destScriptsDir, 'check_reqs'), path_regex, '');
utils.replaceFileContents(path.join(destScriptsDir, 'apple_ios_version'), path_regex, '');
utils.replaceFileContents(path.join(destScriptsDir, 'apple_osx_version'), path_regex, '');
utils.replaceFileContents(path.join(destScriptsDir, 'apple_xcode_version'), path_regex, '');
Expand Down Expand Up @@ -237,19 +232,6 @@ exports.createProject = (project_path, package_name, project_name, opts, config)
return Promise.resolve();
};

exports.updateProject = (projectPath, opts) => {
const errorString =
'An in-place platform update is not supported. \n' +
'The `platforms` folder is always treated as a build artifact.\n' +
'To update your platform, you have to remove, then add your ios platform again.\n' +
'Make sure you save your plugins beforehand using `cordova plugin save`, and save a copy of the platform first if you had manual changes in it.\n' +
'\tcordova plugin save\n' +
'\tcordova platform rm ios\n' +
'\tcordova platform add ios\n';

return Promise.reject(new CordovaError(errorString));
};

function generateDoneMessage (type, link) {
const pkg = require('../../package');
let msg = `iOS project ${type === 'update' ? 'updated' : 'created'} with ${pkg.name}@${pkg.version}`;
Expand Down
23 changes: 10 additions & 13 deletions bin/templates/scripts/cordova/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,16 @@ class Api {
static updatePlatform (destination, options, events) {
setupEvents(events);

let result;
try {
result = require('../../../lib/create')
.updateProject(destination, options)
.then(() => {
const PlatformApi = require(path.resolve(destination, 'cordova/Api'));
return new PlatformApi('ios', destination, events);
});
} catch (e) {
events.emit('error', 'updatePlatform is not callable from the iOS project API, you will need to do this manually.');
throw e;
}
return result;
const errorString =
'The update platform command is not supported.\n' +
'The `platforms` folder is always treated as a build artifact.\n' +
'To update, you have to remove the old platform and add the new platform.\n' +
'Make sure to save your plugins beforehand using `cordova plugin save`, and save a copy of the platform first if you had manual changes.\n' +
'\tcordova plugin save\n' +
'\tcordova platform rm ios\n' +
'\tcordova platform add ios\n';

return Promise.reject(new CordovaError(errorString));
}

/**
Expand Down
66 changes: 0 additions & 66 deletions bin/templates/scripts/cordova/build

This file was deleted.

19 changes: 0 additions & 19 deletions bin/templates/scripts/cordova/build.bat

This file was deleted.

52 changes: 0 additions & 52 deletions bin/templates/scripts/cordova/clean

This file was deleted.

19 changes: 0 additions & 19 deletions bin/templates/scripts/cordova/clean.bat

This file was deleted.

Loading