diff options
author | Fabio Berger <me@fabioberger.com> | 2018-08-23 01:52:17 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-08-23 01:52:17 +0800 |
commit | b7c119b2aaaa2f3579ca4aeef198eca7f38f1216 (patch) | |
tree | 16956eb295a2b0a21fcab07b4e2377c2cd59d3c9 /packages/monorepo-scripts/src/utils/github_release_utils.ts | |
parent | 3c2af2067f768bd3ffe233d9a7c2d0232db6868e (diff) | |
download | dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.gz dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.bz2 dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.lz dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.xz dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.tar.zst dexon-sol-tools-b7c119b2aaaa2f3579ca4aeef198eca7f38f1216.zip |
Fix many linter errors that showed up upon upgrading tsutil
Diffstat (limited to 'packages/monorepo-scripts/src/utils/github_release_utils.ts')
-rw-r--r-- | packages/monorepo-scripts/src/utils/github_release_utils.ts | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 1f4c4f1e9..28dce70ac 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -1,27 +1,29 @@ -import * as _ from 'lodash'; import * as promisify from 'es6-promisify'; +import { readFileSync } from 'fs'; +import * as _ from 'lodash'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; import * as publishRelease from 'publish-release'; import { constants } from '../constants'; import { Package } from '../types'; -import { utils } from './utils'; -import { readFileSync } from 'fs'; -import * as path from 'path'; -import { exec as execAsync } from 'promisify-child-process'; +import { utils } from './utils'; const publishReleaseAsync = promisify(publishRelease); +// tslint:disable-next-line:completed-docs export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); const latestGitCommit = result.stdout; - const shortenedGitCommit = latestGitCommit.slice(0, 7); + const prefixLength = 7; + const shortenedGitCommit = latestGitCommit.slice(0, prefixLength); const tagName = `monorepo@${shortenedGitCommit}`; await execAsync(`git rev-parse ${tagName}`); - await execAsync('git tag ${tagName}'); + await execAsync(`git tag ${tagName}`); - await execAsync('git push origin ${tagName}'); + await execAsync(`git push origin ${tagName}`); const releaseName = `0x monorepo - ${shortenedGitCommit}`; let assets: string[] = []; |