Merge pull request #72 from bcmi-labs/azure-service-connection-update

Switched to `typefox-service-account1`.
This commit is contained in:
Akos Kitta 2019-10-17 10:00:27 +02:00 committed by GitHub
commit 06ef598806
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 10 deletions

5
.vscode/launch.json vendored
View File

@ -7,8 +7,9 @@
{
"type": "node",
"request": "launch",
"name": "Launch Node.js Program",
"program": "${file}"
"name": "Launch Electron Packager",
"program": "${workspaceRoot}/electron/packager/index.js",
"cwd": "${workspaceFolder}/electron/packager"
},
{
"type": "node",

View File

@ -69,7 +69,7 @@ jobs:
downloadPath: 'gh-release'
- task: GithubRelease@0
inputs:
gitHubConnection: personal-access-token-service-connection
gitHubConnection: typefox-service-account1
repositoryName: bcmi-labs/arduino-editor
assets: |
gh-release/Arduino-PoC - Applications/*.zip

View File

@ -33,10 +33,8 @@
//---------------------------+
// rm -rf ../working-copy
rm('-rf', path('..', workingCopy));
// rm -rf ../build/dist
rm('-rf', path('..', 'build', 'dist'));
// rm -rf ../build/package.json
rm('-rf', path('..', 'build', 'package.json'));
// Clean up the `./electron/build` folder.
shell.exec(`git -C ${path('..', 'build')} clean -ffxdq`, { async: false });
//----------------------------------------------------------------------------------------------+
// Copy the following items into the `working-copy` folder. Make sure to reuse the `yarn.lock`. |
@ -79,7 +77,7 @@
pkg = require('../working-copy/electron-app/package.json');
// @ts-ignore
const template = require('../build/template-package.json');
template.build.files = [ ...template.build.files, ...unusedDependencies.map(name => `!node_modules/${name}`) ];
template.build.files = [...template.build.files, ...unusedDependencies.map(name => `!node_modules/${name}`)];
pkg.dependencies = { ...pkg.dependencies, ...template.dependencies };
pkg.devDependencies = { ...pkg.devDependencies, ...template.devDependencies };
fs.writeFileSync(path('..', 'build', 'package.json'), JSON.stringify({
@ -95,6 +93,17 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
-----------------------
`);
// Make sure the original `yarn.lock` file is used from the electron application.
if (fs.existsSync(path('..', 'build', 'yarn.lock'))) {
echo(`${path('..', 'build', 'yarn.lock')} must not exist.`);
shell.exit(1);
}
cp('-rf', path(rootPath, 'yarn.lock'), path('..', 'build'));
if (!fs.existsSync(path('..', 'build', 'yarn.lock'))) {
echo(`${path('..', 'build', 'yarn.lock')} does not exist.`);
shell.exit(1);
}
//-------------------------------------------------------------------------------------------+
// Install all private and public dependencies for the electron application and build Theia. |
//-------------------------------------------------------------------------------------------+
@ -109,7 +118,7 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
rm('-rf', path('..', 'build', dotenv));
}
// For the releases we use the desired tag as is defined by `$(Release.Tag)` from Azure.
// For the preview builds we use the version from the `electron/build/package.json` with the short commit hash.
// For the preview builds we use the version from the `electron/build/package.json` with the short commit hash.
fs.writeFileSync(path('..', 'build', dotenv), `ARDUINO_VERSION=${version}`);
//-----------------------------------+
@ -186,4 +195,4 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
return join(__dirname, ...paths);
}
})();
})();