Release branch pipeline
ADD
bundles/webdriveragent-xcode_10.2.tar.gz
bundles/webdriveragent-xcode_10.2.tar.gz
Binary files /dev/null and b/bundles/webdriveragent-xcode_10.2.tar.gz differ

ADD
ci-jobs/create-release-branch.yml
+steps:
+- task: NodeTool@0
+ inputs:
+ versionSpec: '12.x'
+- script: npm install
+ displayName: NPM install
+- script: |
+ git remote add triager https://triager:$GITHUB_TOKEN@github.com/appium/appium
+ git checkout -b $MINOR_BRANCH_NAME
+ git status
+ node ./ci-jobs/scripts/set-package-json-version
+ rm -rf package-lock.json
+ npm shrinkwrap
+ git add .
+ git commit -n -m "Set version to $(MINOR_BRANCH_NAME).0-rc.0"
+ git push -u triager $MINOR_BRANCH_NAME
+ displayName: Create branch
+ env:
+ GITHUB_TOKEN: $(GITHUB_TOKEN)
+ MINOR_BRANCH_NAME: $(MINOR_BRANCH_NAME)
+- script: |
+ git tag $MINOR_BRANCH_NAME.0-rc.0
+ git push --tags -u triager
+ echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
+ npm publish --tag $(node ./ci-jobs/scripts/parse-tag)
+ env:
+ NPM_TOKEN: $(NPM_TOKEN)
+ displayName: Tag and Publish
+

ADD
ci-jobs/scripts/parse-tag.js
+const semver = require('semver');
+const { version } = require('../../package.json');
+console.log(semver(version).prerelease[0]); //eslint-disable-line no-console
\ No newline at end of file

ADD
ci-jobs/scripts/set-package-json-version.js
+const path = require('path');
+const { fs, logger } = require('appium-support');
+const { asyncify } = require('asyncbox');
+const packageJson = require('../../package.json');
+
+const log = new logger.getLogger('Create Release Branch:');
+
+async function setPackageJsonVersion (version = `${process.env.MINOR_BRANCH_NAME}.0-rc.0`) {
+ packageJson.version = version;
+ log.info(`Setting version to: ${version}`);
+ await fs.writeFile(
+ path.resolve(__dirname, '..', '..', 'package.json'),
+ JSON.stringify(packageJson, null, 2),
+ 'utf8',
+ );
+}
+
+if (require.main === module) {
+ asyncify(setPackageJsonVersion);
+}
+
+module.exports = setPackageJsonVersion;
\ No newline at end of file

MODIFY
ci-jobs/templates/bundle-template.yml
ci-jobs/templates/bundle-template.yml
@@ -11,7 +11,7 @@ jobs:
displayName: Print GCC Version
- task: NodeTool@0
inputs:
- versionSpec: '11.x'
+ versionSpec: '12.x'
- script: npm ci || npm install # "npm ci" if shrinkwrap is present
displayName: Install NPM Dependencies
- script: |

MODIFY
package.json
package.json
"lodash": "^4.17.11",
"longjohn": "^0.2.12",
"npmlog": "4.x",
+ "semver": "^6.1.2",
"request": "^2.81.0",
"request-promise": "4.x",
- "semver": "^6.0.0",
"source-map-support": "0.x",
"teen_process": "1.x",
"winston": "3.x",

Release branch pipeline (#12820)