From 18793b28c77c464713435f3fe89a7ceec888d0d1 Mon Sep 17 00:00:00 2001 From: Jerome Quere Date: Tue, 24 Mar 2020 22:15:41 +0100 Subject: [PATCH 1/5] chore: add release script --- .gitignore | 1 + scripts/release.sh | 6 + scripts/release/package.json | 18 + scripts/release/release.js | 363 +++++++++++++++ scripts/release/yarn.lock | 875 +++++++++++++++++++++++++++++++++++ 5 files changed, 1263 insertions(+) create mode 100755 scripts/release.sh create mode 100644 scripts/release/package.json create mode 100644 scripts/release/release.js create mode 100644 scripts/release/yarn.lock diff --git a/.gitignore b/.gitignore index 3ed9159c18..7371ffe5e5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .idea .vscode /bin +node_modules diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000000..86d4d9625e --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +cd scripts/release || (echo "Please run this script from repo root" && exit 1) + +yarn install --frozen-lock-file +yarn run release diff --git a/scripts/release/package.json b/scripts/release/package.json new file mode 100644 index 0000000000..987821de25 --- /dev/null +++ b/scripts/release/package.json @@ -0,0 +1,18 @@ +{ + "name": "scripts", + "version": "1.0.0", + "main": "index.js", + "license": "Apache-2.0", + "dependencies": { + "@octokit/rest": "^17.1.1", + "aws-sdk": "^2.645.0", + "colors": "^1.4.0", + "external-editor": "^3.1.0", + "get-stream": "^5.1.0", + "git-raw-commits": "^2.0.2", + "semver": "^6.3.0" + }, + "scripts": { + "release": "node release.js" + } +} diff --git a/scripts/release/release.js b/scripts/release/release.js new file mode 100644 index 0000000000..276f069aeb --- /dev/null +++ b/scripts/release/release.js @@ -0,0 +1,363 @@ +/****************************************************************************** + * Scaleway CLI release script. + * + * This script will trigger a release process for the scaleway Go SDK. + * + * The script will proceed as follow: + * - Create a new remote `scaleway-release` that point to main repo + * - Prompt the new version number + * - Create release commit + * - Generate a changelog + * - Update version in cmd/scw/main.go + * - Update version in the README + * - Ask to review changes + * - Create a release PR on github + * - Create a release + * - Build binary that should be upload on the github release with there SHA256SUM + * - Create a github release + * - Attach compiled binary to the github release + * - Update S3 version file + * - Create a post release commit + * - Update cmd/scw/main.go to add +dev at the end + * - Ask to merge this changes to master via PR + * - Delete temporary remote `scaleway-release` that was created earlier + ******************************************************************************/ + +// Import standard node library +const { spawnSync } = require("child_process"), + readline = require("readline"), + fs = require("fs"), + util = require("util") +; + +// Import third party library +const gitRawCommits = require("git-raw-commits"), + semver = require("semver"), + getStream = require("get-stream"), + externalEditor = require("external-editor"), + _ = require("colors"), + { Octokit } = require("@octokit/rest"), + AWS = require('aws-sdk') +; + +/* + * Required parameters + */ +// A valid github personal token that should have write access to github repo. +const GITHUB_TOKEN=process.env.GITHUB_TOKEN; +// A scaleway access key that should have write access to the devtool bucket. +const SCW_ACCESS_KEY=process.env.SCW_ACCESS_KEY; +// A scaleway secet key that should have write access to the devtool bucket. +const SCW_SECRET_KEY=process.env.SCW_SECRET_KEY; + + +/* + * Global configuration + */ +// The root git directory. All future path should be relative to this one. +const ROOT_DIR = "../.."; +// The script used to build release binary +const BUILD_SCRIPT = "./scripts/build.sh"; +// The directory that contains release binary created by BUILD_SCRIPT +const BIN_DIR_PATH = "./bin/"; +// Path to README file +const README_PATH = "./README.md"; +// Path to CHANGELOG file +const CHANGELOG_PATH = "./CHANGELOG.md"; +// Go file that contain the version string to replace during release process. +const GO_VERSION_PATH = "./cmd/scw/main.go"; +// Name of the temporary branch that will be used during the release process. +const TMP_BRANCH = "new-release"; +// Name of the temporary remote that will be used during the release process. +const TMP_REMOTE = "scaleway-release"; +// Name of the github repo namespace (user or orga). +const GITHUB_OWNER = "jerome-quere"; +// Name of the github repo. +const GITHUB_REPO = "scaleway-cli"; +// Name of the devtool bucket. +const S3_DEVTOOL_BUCKET="scw-devtools"; +// Region of the devtool bucket . +const S3_DEVTOOL_BUCKET_REGION="nl-ams"; +// S3 object name of the version file that should be updated during release. +const S3_VERSION_OBJECT_NAME="scw-cli-v2-version"; + +/* + * Usefull constant + */ +const GITHUB_CLONE_URL = `git@github.com:${GITHUB_OWNER}/${GITHUB_REPO}.git"`; +const GITHUB_REPO_URL = `https://github.com/${GITHUB_OWNER}/${GITHUB_REPO}`; +const COMMIT_REGEX = new RegExp(`${_typeReg.source}${_scopeReg.source}: *${_messageReg.source} *${_mrReg.source}`); +const _typeReg = /(?[a-zA-Z]+)/; +const _scopeReg = /(\((?.*)\))?/; +const _messageReg = /(?[^(]*)/; +const _mrReg = /(\(#(?[0-9]+)\))?/; + + +async function main() { + + /* + * Initialization + */ + + // Chdir to root dir + process.chdir(ROOT_DIR); + + // Initialize github client + if (!GITHUB_TOKEN) { + throw new Error(`You must provide a valid GITHUB_TOKEN`) + } + octokit = new Octokit({ auth: GITHUB_TOKEN }); + + // Initialize s3 client + if (!SCW_ACCESS_KEY || !SCW_SECRET_KEY) { + throw new Error(`You must provide a valid access and secret key`) + } + const s3 = new AWS.S3({ + credentials: new AWS.Credentials(SCW_ACCESS_KEY, SCW_SECRET_KEY), + endpoint: `s3.${S3_DEVTOOL_BUCKET_REGION}.scw.cloud`, + region: `${S3_DEVTOOL_BUCKET_REGION}`, + }); + + /* + * Initialize TMP_REMOTE + */ + console.log("Adding temporary remote on local repo".blue); + git( "remote", "add", TMP_REMOTE, GITHUB_CLONE_URL); + console.log(` Successfully created ${TMP_REMOTE} remote`.green); + + console.log("Make sure we are working on an up to date v2 branch".blue); + git( "fetch", TMP_REMOTE); + git( "checkout", `${TMP_REMOTE}/v2`); + console.log(` Successfully created ${TMP_REMOTE} remote`.green); + + /* + * Trying to find the lastest tag to generate changelog + */ + console.log("Trying to find last release tag".blue); + const lastSemverTag = git("tag") + .trim() + .split("\n") + .filter(semver.valid) + .sort((a, b) => semver.rcompare(semver.clean(a), semver.clean(b)))[0]; + const lastVersion = semver.clean(lastSemverTag); + const lastVersionWithDash = lastVersion.replace(/\./g, "-"); + console.log(` Last found release tag was ${lastSemverTag}`.green); + + console.log("Listing commit since last release".blue); + const commits = (await getStream.array(gitRawCommits({ from: lastSemverTag, format: "%s" }))).map(c => c.toString().trim()); + commits.forEach(c => console.log(` ${c}`.grey)); + console.log(` We found ${commits.length} commits since last release`.green); + + const newVersion = semver.clean(await prompt("Enter new version: ".magenta)); + if (!newVersion) { + throw new Error(`invalid version`); + } + const newVersionWithDash = newVersion.replace(/\./g, "-"); + + // + // Creating release commit + // + + console.log(`Updating ${CHANGELOG_PATH} and ${GO_VERSION_PATH}`.blue); + const changelog = buildChangelog(newVersion, commits); + changelog.body = externalEditor.edit(changelog.body); + + replaceInFile(README_PATH, lastVersion, newVersion); + replaceInFile(README_PATH, lastVersionWithDash, newVersionWithDash); + replaceInFile(CHANGELOG_PATH, "# Changelog", `# Changelog\n\n${changelog.header}\n\n${changelog.body}\n`); + replaceInFile(GO_VERSION_PATH, /Version = "[^"]*"/, `Version = "v${newVersion}"`); + console.log(` Update success`.green); + + await prompt(`Please review ${README_PATH}, ${CHANGELOG_PATH} and ${GO_VERSION_PATH}. When everything is fine hit enter to continue ...`.magenta); + + console.log(`Creating release commit`.blue); + git("checkout", "-b", TMP_BRANCH); + git("add", README_PATH, CHANGELOG_PATH, GO_VERSION_PATH); + git("commit", "-m", `chore: release ${newVersion}`); + git("push", "-f", "--set-upstream", TMP_REMOTE, TMP_BRANCH); + + const prResp = await octokit.pulls.create({ + owner: GITHUB_OWNER, + repo: GITHUB_REPO, + base: "v2", + head: TMP_BRANCH, + title: `chore: release ${newVersion}` + }); + console.log(` Successfully create pull request: ${prResp.data.html_url}`.green); + await prompt(`Hit enter when its merged .....`.magenta); + + // + // Creating release + // + + console.log("Compiling release binary".blue); + exec(BUILD_SCRIPT); + + console.log("Create Github release".blue); + console.log(" create github release".gray); + let releaseResp = await octokit.repos.createRelease({ + owner: GITHUB_OWNER, + repo: GITHUB_REPO, + tag_name: newVersion, + target_commitish: "v2", + name: newVersion, + body: changelog.body, + prerelease: true, + }); + + console.log(" attach assets to the release".gray); + const releaseAssets = [ + `scw-${newVersionWithDash}-darwin-x86_64`, + `scw-${newVersionWithDash}-linux-x86_64`, + `scw-${newVersionWithDash}-windows-x86_64.exe`, + `SHA256SUMS`, + ]; + await Promise.all(releaseAssets.map((assetName) => { + return octokit.repos.uploadReleaseAsset({ + owner: GITHUB_OWNER, + repo: GITHUB_REPO, + release_id: releaseResp.data.id, + name: assetName, + data: fs.readFileSync(`${BIN_DIR_PATH}/${assetName}`), + }) + })); + + console.log(` Successfully create release: ${releaseResp.data.html_url}`.green); + await prompt(`Hit enter when if everything is fine .....`.magenta); + + // + // Update version file on s3 + // + console.log("Compiling release binary".blue); + await util.promisify(s3.putObject.bind(s3))({ + Body: newVersion, + Bucket: S3_DEVTOOL_BUCKET, + Key: S3_VERSION_OBJECT_NAME + }); + console.log(` Successfully update s3 version file: https://${S3_DEVTOOL_BUCKET}.s3.${S3_DEVTOOL_BUCKET_REGION}.scw.cloud/${S3_VERSION_OBJECT_NAME}`.green); + await prompt(`Hit enter to continue .....`.magenta); + + // + // Creating post release commit + // + console.log("Make sure we pull the latest commit from master".blue); + git("fetch", TMP_REMOTE); + git("checkout", `${TMP_REMOTE}/master`); + console.log(" Successfully checkout upstream/master".green); + + console.log(`Creating post release commit`.blue); + git("branch", "-D", TMP_BRANCH); + git("checkout", "-b", TMP_BRANCH); + replaceInFile(GO_VERSION_PATH, /Version = "[^"]"/, `Version = "v${newVersion}+dev"`); + git("add", GO_VERSION_PATH); + git("commit", "-m", `chore: cleanup after v${newVersion} release`); + git("push", "-f", "--set-upstream", TMP_REMOTE, TMP_BRANCH); + git("checkout", "master"); + git("branch", "-D", TMP_BRANCH); + const postPrResp = await octokit.pulls.create({ + owner: GITHUB_OWNER, + repo: GITHUB_REPO, + base: "v2", + head: TMP_BRANCH, + }); + console.log(` Successfully create pull request: ${postPrResp.data.html_url}`.green); + await prompt(`Hit enter when its merged .....`.magenta); + + console.log("Make sure we pull the latest commit from v2".blue); + git("pull", TMP_REMOTE, "v2"); + console.log(" Successfully pull master".green); + + console.log("Remove temporary remote".blue); + git("remote", "remove", TMP_REMOTE); + console.log(" Successfully remove temporary remote".green); + + console.log(`🚀 Release Success `.green); +} + +function git(...args) { + return exec("git", ...args) +} + +function exec(cmd, ...args) { + console.log(` ${cmd} ${args.join(" ")}`.grey); + const { stdout, status, stderr } = spawnSync(cmd, args, { encoding: "utf8" }); + if (status !== 0) { + throw new Error(`return status ${status}\n${stderr}\n`); + } + return stdout; +} + + +function replaceInFile(path, oldStr, newStr) { + console.log(` Editing ${path}`.grey); + let content = fs.readFileSync(path, { encoding: "utf8" }); + if (oldStr instanceof RegExp) { + content = content.replace(oldStr, newStr); + } else { + content = content.split(oldStr).join(newStr); + } + + fs.writeFileSync(path, content); +} + +function prompt(prompt) { + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + return new Promise(resolve => { + rl.question(prompt, answer => { + resolve(answer); + rl.close(); + }); + }); +} + +function buildChangelog(newVersion, commits) { + const changelogLines = { feat: [], fix: [], others: [] }; + commits.forEach(commit => { + const result = COMMIT_REGEX.exec(commit); + + // If commit do not match a valid commit regex we add it in others section without formatting + if (!result) { + console.warn(`WARNING: Malformed commit ${commit}`.yellow); + changelogLines.others.push(commit); + return; + } + const stdCommit = result.groups; + + // If commit type is not one of [feat, fix] we add it in the other group. This will probably need further human edition. + if (!(stdCommit.type in changelogLines)) { + stdCommit.scope = [ stdCommit.type, stdCommit.scope ].filter(str => str).join(" - "); + stdCommit.type = "others"; + } + + const line = [ + `*`, + stdCommit.scope ? `**${stdCommit.scope}**:` : "", + stdCommit.message, + stdCommit.mr ? `([#${stdCommit.mr}](${GITHUB_REPO_URL}/pull/${stdCommit.mr}))` : "" + ] + .map(s => s.trim()) + .filter(v => v) + .join(" "); + changelogLines[stdCommit.type].push(line); + }); + + const changelogSections = []; + if (changelogLines.feat) { + changelogSections.push("### Features\n\n" + changelogLines.feat.sort().join("\n")); + } + if (changelogLines.fix) { + changelogSections.push("### Fixes\n\n" + changelogLines.fix.sort().join("\n")); + } + if (changelogLines.others) { + changelogSections.push("### Others\n\n" + changelogLines.others.sort().join("\n")); + } + return { + header: `## v${newVersion} (${new Date().toISOString().substring(0, 10)})`, + body: changelogSections.join("\n\n"), + } +} + +main().catch(console.error); diff --git a/scripts/release/yarn.lock b/scripts/release/yarn.lock new file mode 100644 index 0000000000..5e92c872d7 --- /dev/null +++ b/scripts/release/yarn.lock @@ -0,0 +1,875 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@octokit/auth-token@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.0.tgz#b64178975218b99e4dfe948253f0673cbbb59d9f" + integrity sha512-eoOVMjILna7FVQf96iWc3+ZtE/ZT6y8ob8ZzcqKY1ibSQCnu4O/B7pJvzMx5cyZ/RjAff6DAdEb0O0Cjcxidkg== + dependencies: + "@octokit/types" "^2.0.0" + +"@octokit/core@^2.4.0": + version "2.4.2" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-2.4.2.tgz#c22e583afc97e74015ea5bfd3ffb3ffc56c186ed" + integrity sha512-fUx/Qt774cgiPhb3HRKfdl6iufVL/ltECkwkCg373I4lIPYvAPY4cbidVZqyVqHI+ThAIlFlTW8FT4QHChv3Sg== + dependencies: + "@octokit/auth-token" "^2.4.0" + "@octokit/graphql" "^4.3.1" + "@octokit/request" "^5.3.1" + "@octokit/types" "^2.0.0" + before-after-hook "^2.1.0" + universal-user-agent "^5.0.0" + +"@octokit/endpoint@^5.5.0": + version "5.5.3" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-5.5.3.tgz#0397d1baaca687a4c8454ba424a627699d97c978" + integrity sha512-EzKwkwcxeegYYah5ukEeAI/gYRLv2Y9U5PpIsseGSFDk+G3RbipQGBs8GuYS1TLCtQaqoO66+aQGtITPalxsNQ== + dependencies: + "@octokit/types" "^2.0.0" + is-plain-object "^3.0.0" + universal-user-agent "^5.0.0" + +"@octokit/graphql@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.3.1.tgz#9ee840e04ed2906c7d6763807632de84cdecf418" + integrity sha512-hCdTjfvrK+ilU2keAdqNBWOk+gm1kai1ZcdjRfB30oA3/T6n53UVJb7w0L5cR3/rhU91xT3HSqCd+qbvH06yxA== + dependencies: + "@octokit/request" "^5.3.0" + "@octokit/types" "^2.0.0" + universal-user-agent "^4.0.0" + +"@octokit/plugin-paginate-rest@^2.0.0": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.0.2.tgz#fee7a81a4cc7d03784aaf9225499dd6e27f6d01e" + integrity sha512-HzODcSUt9mjErly26TlTOGZrhf9bmF/FEDQ2zln1izhgmIV6ulsjsHmgmR4VZ0wzVr/m52Eb6U2XuyS8fkcR1A== + dependencies: + "@octokit/types" "^2.0.1" + +"@octokit/plugin-request-log@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz#eef87a431300f6148c39a7f75f8cfeb218b2547e" + integrity sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw== + +"@octokit/plugin-rest-endpoint-methods@^3.3.0": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.3.1.tgz#279920ee391bd7e944ae4aa7fa435ba0c51fbb6a" + integrity sha512-iLAXPLWBZaP6ocy1GFfZUCzyN4cwg3y2JE6yZjQo0zLE3UaewC3TI68/TnS4ilyhXDxh81Jr1qwPN1AqTp8t3w== + dependencies: + "@octokit/types" "^2.0.1" + deprecation "^2.3.1" + +"@octokit/request-error@^1.0.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801" + integrity sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA== + dependencies: + "@octokit/types" "^2.0.0" + deprecation "^2.0.0" + once "^1.4.0" + +"@octokit/request@^5.3.0", "@octokit/request@^5.3.1": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.3.2.tgz#1ca8b90a407772a1ee1ab758e7e0aced213b9883" + integrity sha512-7NPJpg19wVQy1cs2xqXjjRq/RmtSomja/VSWnptfYwuBxLdbYh2UjhGi0Wx7B1v5Iw5GKhfFDQL7jM7SSp7K2g== + dependencies: + "@octokit/endpoint" "^5.5.0" + "@octokit/request-error" "^1.0.1" + "@octokit/types" "^2.0.0" + deprecation "^2.0.0" + is-plain-object "^3.0.0" + node-fetch "^2.3.0" + once "^1.4.0" + universal-user-agent "^5.0.0" + +"@octokit/rest@^17.1.1": + version "17.1.1" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-17.1.1.tgz#357a9f6da687fc2ca9276715c1541562bd2c1581" + integrity sha512-Cn9XpevTJdQj/GbACY1WjArDabPpdAhvlS5zoCdZ/chiKbl4vutL1X1VeJHzDLK0K6BdZXXe4SnEPN31wKPA7A== + dependencies: + "@octokit/core" "^2.4.0" + "@octokit/plugin-paginate-rest" "^2.0.0" + "@octokit/plugin-request-log" "^1.0.0" + "@octokit/plugin-rest-endpoint-methods" "^3.3.0" + +"@octokit/types@^2.0.0", "@octokit/types@^2.0.1": + version "2.5.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-2.5.0.tgz#f1bbd147e662ae2c79717d518aac686e58257773" + integrity sha512-KEnLwOfdXzxPNL34fj508bhi9Z9cStyN7qY1kOfVahmqtAfrWw6Oq3P4R+dtsg0lYtZdWBpUrS/Ixmd5YILSww== + dependencies: + "@types/node" ">= 8" + +"@types/node@>= 8": + version "13.9.3" + resolved "https://registry.yarnpkg.com/@types/node/-/node-13.9.3.tgz#6356df2647de9eac569f9a52eda3480fa9e70b4d" + integrity sha512-01s+ac4qerwd6RHD+mVbOEsraDHSgUaefQlEdBbUolnQFjKwCr7luvAlEwW1RFojh67u0z4OUTjPn9LEl4zIkA== + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= + +arrify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +aws-sdk@^2.645.0: + version "2.645.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.645.0.tgz#20865d693a5150fb6d5770ba3ce1efd558d4bd0a" + integrity sha512-zElxkYl5lRxf1wiByd6C3kBKBNtA04ltC++DhcL3OypNBAn/LjnHLR1r7TOn6XyM9xgM7wPwm7MS43n0AS2qYg== + dependencies: + buffer "4.9.1" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.3.2" + xml2js "0.4.19" + +base64-js@^1.0.2: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + +before-after-hook@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" + integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== + +buffer@4.9.1: + version "4.9.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298" + integrity sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg= + dependencies: + base64-js "^1.0.2" + ieee754 "^1.1.4" + isarray "^1.0.0" + +camelcase-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + integrity sha1-oqpfsa9oh1glnDLBQUJteJI7m3c= + dependencies: + camelcase "^4.1.0" + map-obj "^2.0.0" + quick-lru "^1.0.0" + +camelcase@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" + integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= + +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + +colors@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + integrity sha1-mI3zP+qxke95mmE2nddsF635V+o= + dependencies: + array-find-index "^1.0.1" + +dargs@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17" + integrity sha1-A6nbtLXC8Tm/FK5T8LiipqhvThc= + dependencies: + number-is-nan "^1.0.0" + +decamelize-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + integrity sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +events@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" + integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +external-editor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" + integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + +find-up@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" + integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== + dependencies: + pump "^3.0.0" + +git-raw-commits@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.3.tgz#f040e67b8445962d4d168903a9e84c4240c17655" + integrity sha512-SoSsFL5lnixVzctGEi2uykjA7B5I0AhO9x6kdzvGRHbxsa6JSEgrgy1esRKsfOKE1cgyOJ/KDR2Trxu157sb8w== + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^5.0.0" + split2 "^2.0.0" + through2 "^3.0.0" + +graceful-fs@^4.1.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + +hosted-git-info@^2.1.4: + version "2.8.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.5.tgz#759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c" + integrity sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== + +iconv-lite@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +ieee754@1.1.13, ieee754@^1.1.4: + version "1.1.13" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" + integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== + +indent-string@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= + +inherits@^2.0.3, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-object@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.0.tgz#47bfc5da1b5d50d64110806c199359482e75a928" + integrity sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg== + dependencies: + isobject "^4.0.0" + +is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-4.0.0.tgz#3f1c9155e73b192022a80819bacd0343711697b0" + integrity sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA== + +jmespath@0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217" + integrity sha1-o/Iiqarp+Wb10nx5ZRDigJF2Qhc= + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= + +lodash.template@^4.0.2: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.templatesettings "^4.0.0" + +lodash.templatesettings@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== + dependencies: + lodash._reinterpolate "^3.0.0" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + integrity sha1-W0b4AUft7leIcPCG0Eghz5mOVR8= + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +macos-release@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.3.0.tgz#eb1930b036c0800adebccd5f17bc4c12de8bb71f" + integrity sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA== + +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= + +map-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + integrity sha1-plzSkIepJZi4eRJXpSPgISIqwfk= + +meow@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4" + integrity sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + yargs-parser "^10.0.0" + +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + integrity sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ== + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-fetch@^2.3.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd" + integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= + +once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +os-name@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801" + integrity sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg== + dependencies: + macos-release "^2.2.0" + windows-release "^3.1.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-parse@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" + integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@1.3.2: + version "1.3.2" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" + integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= + +querystring@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" + integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= + +quick-lru@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + integrity sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g= + +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +"readable-stream@2 || 3": + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +redent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + integrity sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo= + dependencies: + indent-string "^3.0.0" + strip-indent "^2.0.0" + +resolve@^1.10.0: + version "1.15.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" + integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== + dependencies: + path-parse "^1.0.6" + +safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@~5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519" + integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg== + +"safer-buffer@>= 2.1.2 < 3": + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +sax@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + integrity sha1-e45lYZCyKOgaZq6nSEgNgozS03o= + +sax@>=0.6.0: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + +"semver@2 || 3 || 4 || 5", semver@^5.5.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0= + +spdx-correct@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" + integrity sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz#2ea450aee74f2a89bfb94519c07fcd6f41322977" + integrity sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + +spdx-expression-parse@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz#99e119b7a5da00e05491c9fa338b7904823b41d0" + integrity sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.5" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" + integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== + +split2@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/split2/-/split2-2.2.0.tgz#186b2575bcf83e85b7d18465756238ee4ee42493" + integrity sha512-RAb22TG39LhI31MbreBgIuKiIKhVsawfTgEGqKHTK87aG+ul/PB8Sqoi3I7kVdRWiCfrKxK3uo4/YUkpNvhPbw== + dependencies: + through2 "^2.0.2" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= + +through2@^2.0.2: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +through2@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/through2/-/through2-3.0.1.tgz#39276e713c3302edf9e388dd9c812dd3b825bd5a" + integrity sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== + dependencies: + readable-stream "2 || 3" + +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +trim-newlines@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + integrity sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA= + +universal-user-agent@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557" + integrity sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg== + dependencies: + os-name "^3.1.0" + +universal-user-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-5.0.0.tgz#a3182aa758069bf0e79952570ca757de3579c1d9" + integrity sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q== + dependencies: + os-name "^3.1.0" + +url@0.10.3: + version "0.10.3" + resolved "https://registry.yarnpkg.com/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64" + integrity sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ= + dependencies: + punycode "1.3.2" + querystring "0.2.0" + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +windows-release@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/windows-release/-/windows-release-3.2.0.tgz#8122dad5afc303d833422380680a79cdfa91785f" + integrity sha512-QTlz2hKLrdqukrsapKsINzqMgOUpQW268eJ0OaOpJN32h272waxR9fkB9VoWRtK7uKHG5EHJcTXQBD8XZVJkFA== + dependencies: + execa "^1.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +xml2js@0.4.19: + version "0.4.19" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" + integrity sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q== + dependencies: + sax ">=0.6.0" + xmlbuilder "~9.0.1" + +xmlbuilder@~9.0.1: + version "9.0.7" + resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" + integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= + +xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +yargs-parser@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" + integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== + dependencies: + camelcase "^4.1.0" From 3cab8c98950251e81849fde291fc35455bc3e293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bourgois?= Date: Wed, 25 Mar 2020 15:14:21 +0100 Subject: [PATCH 2/5] Apply suggestions from code review --- scripts/release/release.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release/release.js b/scripts/release/release.js index 276f069aeb..22b5c110a5 100644 --- a/scripts/release/release.js +++ b/scripts/release/release.js @@ -4,7 +4,7 @@ * This script will trigger a release process for the scaleway Go SDK. * * The script will proceed as follow: - * - Create a new remote `scaleway-release` that point to main repo + * - Create a new remote `scaleway-release` that points to main repo * - Prompt the new version number * - Create release commit * - Generate a changelog @@ -130,9 +130,9 @@ async function main() { git( "checkout", `${TMP_REMOTE}/v2`); console.log(` Successfully created ${TMP_REMOTE} remote`.green); - /* - * Trying to find the lastest tag to generate changelog - */ + // + // Trying to find the lastest tag to generate changelog + // console.log("Trying to find last release tag".blue); const lastSemverTag = git("tag") .trim() From 18997375e8aedbec55b6abd172e4967c599a36b7 Mon Sep 17 00:00:00 2001 From: loicbourgois Date: Wed, 25 Mar 2020 15:57:13 +0100 Subject: [PATCH 3/5] update release script --- scripts/release/release.js | 54 ++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/scripts/release/release.js b/scripts/release/release.js index 22b5c110a5..311a76bbe0 100644 --- a/scripts/release/release.js +++ b/scripts/release/release.js @@ -44,6 +44,7 @@ const gitRawCommits = require("git-raw-commits"), * Required parameters */ // A valid github personal token that should have write access to github repo. +// Used only to create PR and Github Release const GITHUB_TOKEN=process.env.GITHUB_TOKEN; // A scaleway access key that should have write access to the devtool bucket. const SCW_ACCESS_KEY=process.env.SCW_ACCESS_KEY; @@ -71,7 +72,7 @@ const TMP_BRANCH = "new-release"; // Name of the temporary remote that will be used during the release process. const TMP_REMOTE = "scaleway-release"; // Name of the github repo namespace (user or orga). -const GITHUB_OWNER = "jerome-quere"; +const GITHUB_OWNER = "scaleway"; // Name of the github repo. const GITHUB_REPO = "scaleway-cli"; // Name of the devtool bucket. @@ -80,6 +81,8 @@ const S3_DEVTOOL_BUCKET="scw-devtools"; const S3_DEVTOOL_BUCKET_REGION="nl-ams"; // S3 object name of the version file that should be updated during release. const S3_VERSION_OBJECT_NAME="scw-cli-v2-version"; +// The branch on which we want to perform the release +const GITHUB_RELEASED_BRANCH="v2"; /* * Usefull constant @@ -118,20 +121,20 @@ async function main() { region: `${S3_DEVTOOL_BUCKET_REGION}`, }); - /* - * Initialize TMP_REMOTE - */ + // + // Initialize TMP_REMOTE + // console.log("Adding temporary remote on local repo".blue); git( "remote", "add", TMP_REMOTE, GITHUB_CLONE_URL); console.log(` Successfully created ${TMP_REMOTE} remote`.green); - console.log("Make sure we are working on an up to date v2 branch".blue); + console.log(`Make sure we are working on an up to date ${GITHUB_RELEASED_BRANCH} branch`.blue); git( "fetch", TMP_REMOTE); - git( "checkout", `${TMP_REMOTE}/v2`); + git( "checkout", `${TMP_REMOTE}/${GITHUB_RELEASED_BRANCH}`); console.log(` Successfully created ${TMP_REMOTE} remote`.green); // - // Trying to find the lastest tag to generate changelog + // Trying to find the latest tag to generate changelog // console.log("Trying to find last release tag".blue); const lastSemverTag = git("tag") @@ -148,6 +151,7 @@ async function main() { commits.forEach(c => console.log(` ${c}`.grey)); console.log(` We found ${commits.length} commits since last release`.green); + console.log(` Last found release tag was ${lastSemverTag}`.grey); const newVersion = semver.clean(await prompt("Enter new version: ".magenta)); if (!newVersion) { throw new Error(`invalid version`); @@ -158,7 +162,7 @@ async function main() { // Creating release commit // - console.log(`Updating ${CHANGELOG_PATH} and ${GO_VERSION_PATH}`.blue); + console.log(`Updating ${README_PATH}, ${CHANGELOG_PATH} and ${GO_VERSION_PATH}`.blue); const changelog = buildChangelog(newVersion, commits); changelog.body = externalEditor.edit(changelog.body); @@ -179,7 +183,7 @@ async function main() { const prResp = await octokit.pulls.create({ owner: GITHUB_OWNER, repo: GITHUB_REPO, - base: "v2", + base: GITHUB_RELEASED_BRANCH, head: TMP_BRANCH, title: `chore: release ${newVersion}` }); @@ -199,7 +203,7 @@ async function main() { owner: GITHUB_OWNER, repo: GITHUB_REPO, tag_name: newVersion, - target_commitish: "v2", + target_commitish: GITHUB_RELEASED_BRANCH, name: newVersion, body: changelog.body, prerelease: true, @@ -222,28 +226,28 @@ async function main() { }) })); - console.log(` Successfully create release: ${releaseResp.data.html_url}`.green); - await prompt(`Hit enter when if everything is fine .....`.magenta); + console.log(` Successfully created release: ${releaseResp.data.html_url}`.green); + await prompt(`Hit enter to continue .....`.magenta); // // Update version file on s3 // - console.log("Compiling release binary".blue); + console.log("Updating version file on s3".blue); await util.promisify(s3.putObject.bind(s3))({ Body: newVersion, Bucket: S3_DEVTOOL_BUCKET, Key: S3_VERSION_OBJECT_NAME }); - console.log(` Successfully update s3 version file: https://${S3_DEVTOOL_BUCKET}.s3.${S3_DEVTOOL_BUCKET_REGION}.scw.cloud/${S3_VERSION_OBJECT_NAME}`.green); + console.log(` Successfully updated s3 version file: https://${S3_DEVTOOL_BUCKET}.s3.${S3_DEVTOOL_BUCKET_REGION}.scw.cloud/${S3_VERSION_OBJECT_NAME}`.green); await prompt(`Hit enter to continue .....`.magenta); // // Creating post release commit // - console.log("Make sure we pull the latest commit from master".blue); + console.log(`Make sure we pull the latest commit from ${GITHUB_RELEASED_BRANCH}`.blue); git("fetch", TMP_REMOTE); - git("checkout", `${TMP_REMOTE}/master`); - console.log(" Successfully checkout upstream/master".green); + git("checkout", `${TMP_REMOTE}/${GITHUB_RELEASED_BRANCH}`); + console.log(` Successfully checkout upstream/${GITHUB_RELEASED_BRANCH}`.green); console.log(`Creating post release commit`.blue); git("branch", "-D", TMP_BRANCH); @@ -252,26 +256,26 @@ async function main() { git("add", GO_VERSION_PATH); git("commit", "-m", `chore: cleanup after v${newVersion} release`); git("push", "-f", "--set-upstream", TMP_REMOTE, TMP_BRANCH); - git("checkout", "master"); + git("checkout", GITHUB_RELEASED_BRANCH); git("branch", "-D", TMP_BRANCH); const postPrResp = await octokit.pulls.create({ owner: GITHUB_OWNER, repo: GITHUB_REPO, - base: "v2", + base: GITHUB_RELEASED_BRANCH, head: TMP_BRANCH, }); - console.log(` Successfully create pull request: ${postPrResp.data.html_url}`.green); - await prompt(`Hit enter when its merged .....`.magenta); + console.log(` Successfully created pull request: ${postPrResp.data.html_url}`.green); + await prompt(`Hit enter when it is merged .....`.magenta); - console.log("Make sure we pull the latest commit from v2".blue); - git("pull", TMP_REMOTE, "v2"); - console.log(" Successfully pull master".green); + console.log(`Make sure we pull the latest commit from ${GITHUB_RELEASED_BRANCH}`.blue); + git("pull", TMP_REMOTE, GITHUB_RELEASED_BRANCH); + console.log(` Successfully pulled ${GITHUB_RELEASED_BRANCH}`.green); console.log("Remove temporary remote".blue); git("remote", "remove", TMP_REMOTE); console.log(" Successfully remove temporary remote".green); - console.log(`🚀 Release Success `.green); + console.log(`🚀 Released with Success `.green); } function git(...args) { From f85111ccaf567666995d3b6540e0da7a417feb29 Mon Sep 17 00:00:00 2001 From: loicbourgois Date: Wed, 25 Mar 2020 16:12:05 +0100 Subject: [PATCH 4/5] update release script --- CHANGELOG.md | 2 -- scripts/release/release.js | 15 +++++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8af8b7d933..65c2555430 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ # Changelog -## v2.0.0-beta.2 (Unreleased) - ## v2.0.0-beta.1 (2020-02-14) * First release 🎉 diff --git a/scripts/release/release.js b/scripts/release/release.js index 311a76bbe0..7ccc12ee63 100644 --- a/scripts/release/release.js +++ b/scripts/release/release.js @@ -67,6 +67,8 @@ const README_PATH = "./README.md"; const CHANGELOG_PATH = "./CHANGELOG.md"; // Go file that contain the version string to replace during release process. const GO_VERSION_PATH = "./cmd/scw/main.go"; +// Golden file used by test that checks whether the CLI is up to date or not. +const VERSION_TEST_GOLDEN_PATH = "./internal/core/testdata/test-check-version-outdated-version.stderr.golden"; // Name of the temporary branch that will be used during the release process. const TMP_BRANCH = "new-release"; // Name of the temporary remote that will be used during the release process. @@ -76,13 +78,13 @@ const GITHUB_OWNER = "scaleway"; // Name of the github repo. const GITHUB_REPO = "scaleway-cli"; // Name of the devtool bucket. -const S3_DEVTOOL_BUCKET="scw-devtools"; +const S3_DEVTOOL_BUCKET = "scw-devtools"; // Region of the devtool bucket . -const S3_DEVTOOL_BUCKET_REGION="nl-ams"; +const S3_DEVTOOL_BUCKET_REGION = "nl-ams"; // S3 object name of the version file that should be updated during release. -const S3_VERSION_OBJECT_NAME="scw-cli-v2-version"; +const S3_VERSION_OBJECT_NAME = "scw-cli-v2-version"; // The branch on which we want to perform the release -const GITHUB_RELEASED_BRANCH="v2"; +const GITHUB_RELEASED_BRANCH = "v2"; /* * Usefull constant @@ -206,7 +208,7 @@ async function main() { target_commitish: GITHUB_RELEASED_BRANCH, name: newVersion, body: changelog.body, - prerelease: true, + prerelease: semver.prerelease(newVersion) !== null, }); console.log(" attach assets to the release".gray); @@ -252,7 +254,8 @@ async function main() { console.log(`Creating post release commit`.blue); git("branch", "-D", TMP_BRANCH); git("checkout", "-b", TMP_BRANCH); - replaceInFile(GO_VERSION_PATH, /Version = "[^"]"/, `Version = "v${newVersion}+dev"`); + replaceInFile(GO_VERSION_PATH, /Version = "[^"]*"/, `Version = "v${newVersion}+dev"`); + replaceInFile(VERSION_TEST_GOLDEN_PATH, /\([^)]*\)/, `(${newVersion})`) git("add", GO_VERSION_PATH); git("commit", "-m", `chore: cleanup after v${newVersion} release`); git("push", "-f", "--set-upstream", TMP_REMOTE, TMP_BRANCH); From e4fc97557d73c42e3894a8f6b41644b5b6238fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bourgois?= Date: Wed, 25 Mar 2020 16:15:25 +0100 Subject: [PATCH 5/5] Update release.js --- scripts/release/release.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/release/release.js b/scripts/release/release.js index 7ccc12ee63..7e5e83470b 100644 --- a/scripts/release/release.js +++ b/scripts/release/release.js @@ -77,14 +77,14 @@ const TMP_REMOTE = "scaleway-release"; const GITHUB_OWNER = "scaleway"; // Name of the github repo. const GITHUB_REPO = "scaleway-cli"; +// The branch on which we want to perform the release +const GITHUB_RELEASED_BRANCH = "v2"; // Name of the devtool bucket. const S3_DEVTOOL_BUCKET = "scw-devtools"; // Region of the devtool bucket . const S3_DEVTOOL_BUCKET_REGION = "nl-ams"; // S3 object name of the version file that should be updated during release. const S3_VERSION_OBJECT_NAME = "scw-cli-v2-version"; -// The branch on which we want to perform the release -const GITHUB_RELEASED_BRANCH = "v2"; /* * Usefull constant