Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-26866
Browse files Browse the repository at this point in the history
  • Loading branch information
ssjsamir committed Mar 5, 2019
2 parents ea2dc28 + 480d2dc commit e9321c3
Show file tree
Hide file tree
Showing 6 changed files with 455 additions and 724 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{
"files": [ "tests/Resources/es6.*.js" ],
"parserOptions": {
"ecmaVersion": 2015,
"ecmaVersion": 2017,
"sourceType": "module"
}
},
Expand Down
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ module.exports = function (grunt) {
grunt.registerMultiTask('checkFormat', 'Validates the source code formatting.', validateFormatting);

// Load grunt plugins for modules
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-appc-js');
grunt.loadNpmTasks('grunt-clang-format');
grunt.loadNpmTasks('grunt-contrib-clean');
Expand Down
18 changes: 11 additions & 7 deletions build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,17 @@ Utils.installSDK = async function (versionTag, symlinkIfPossible = false) {
}

const destDir = path.join(dest, 'mobilesdk', osName, versionTag);
const destStats = fs.lstatSync(destDir);
if (destStats.isDirectory()) {
console.log('Destination exists, deleting %s...', destDir);
await fs.remove(destDir);
} else if (destStats.isSymbolicLink()) {
console.log('Destination exists as symlink, unlinking %s...', destDir);
fs.unlinkSync(destDir);
try {
const destStats = fs.lstatSync(destDir);
if (destStats.isDirectory()) {
console.log('Destination exists, deleting %s...', destDir);
await fs.remove(destDir);
} else if (destStats.isSymbolicLink()) {
console.log('Destination exists as symlink, unlinking %s...', destDir);
fs.unlinkSync(destDir);
}
} catch (error) {
// Do nothing
}

const zipDir = path.join(__dirname, '..', 'dist', `mobilesdk-${versionTag}-${osName}`);
Expand Down

0 comments on commit e9321c3

Please sign in to comment.