mirror of
https://github.com/desktop/desktop
synced 2024-10-01 05:43:50 +00:00
Address review comments
This commit is contained in:
parent
7d1dee546a
commit
0cabb14df7
|
@ -9,16 +9,13 @@ if (PUBLISH_CHANNELS.indexOf(distInfo.getReleaseChannel()) < 0) {
|
|||
}
|
||||
|
||||
const releaseSHA = distInfo.getReleaseSHA()
|
||||
if (!releaseSHA) {
|
||||
if (releaseSHA == null) {
|
||||
console.log(`No release SHA found for build. Skipping publish.`)
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
const currentTipSHA = gitInfo.getSHA()
|
||||
if (
|
||||
!currentTipSHA ||
|
||||
!currentTipSHA.toUpperCase().startsWith(releaseSHA!.toUpperCase())
|
||||
) {
|
||||
if (!currentTipSHA.toUpperCase().startsWith(releaseSHA!.toUpperCase())) {
|
||||
console.log(
|
||||
`Current tip '${currentTipSHA}' does not match release SHA '${releaseSHA}'. Skipping publish.`
|
||||
)
|
||||
|
@ -34,7 +31,7 @@ import * as request from 'request'
|
|||
console.log('Packaging…')
|
||||
execSync('yarn package')
|
||||
|
||||
const getSha = () => {
|
||||
function getSha() {
|
||||
if (process.platform === 'darwin' && process.env.CIRCLE_SHA1 != null) {
|
||||
return process.env.CIRCLE_SHA1
|
||||
} else if (
|
||||
|
@ -51,7 +48,7 @@ const getSha = () => {
|
|||
|
||||
const sha = getSha().substr(0, 8)
|
||||
|
||||
const getSecret = () => {
|
||||
function getSecret() {
|
||||
if (process.env.DEPLOYMENT_SECRET != null) {
|
||||
return process.env.DEPLOYMENT_SECRET
|
||||
}
|
||||
|
@ -151,7 +148,7 @@ function upload(assetName: string, assetPath: string) {
|
|||
s3.upload(
|
||||
uploadParams,
|
||||
(error: Error, data: AWS.S3.ManagedUpload.SendData) => {
|
||||
if (error) {
|
||||
if (error != null) {
|
||||
reject(error)
|
||||
} else {
|
||||
// eslint-disable-next-line no-sync
|
||||
|
|
|
@ -24,7 +24,7 @@ function getPortOrDefault() {
|
|||
|
||||
function startApp() {
|
||||
const runningApp = run({ stdio: 'inherit' })
|
||||
if (!runningApp) {
|
||||
if (runningApp == null) {
|
||||
console.error(
|
||||
"Couldn't launch the app. You probably need to build it first. Run `yarn build:dev`."
|
||||
)
|
||||
|
|
|
@ -15,8 +15,7 @@
|
|||
"include": [
|
||||
"app/**/*.ts",
|
||||
"app/**/*.tsx",
|
||||
"app/**/*.d.tsx",
|
||||
"app/webpack.*.ts"
|
||||
"app/**/*.d.tsx"
|
||||
],
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
|
|
Loading…
Reference in a new issue