Skip to content

Commit

Permalink
fix(release): build app before publish
Browse files Browse the repository at this point in the history
  • Loading branch information
varl committed Jun 28, 2021
1 parent abe4d2c commit 3db46dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/utils/src/support/semantic-release-app-hub.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const fs = require('fs')
const path = require('path')
const { publishCommand } = require('@dhis2/cli-app-scripts')
const { buildCommand, publishCommand } = require('@dhis2/cli-app-scripts')
const SemanticReleaseError = require('@semantic-release/error')

const { handler: publishAppHub } = publishCommand
const { handler: buildApp } = buildCommand

exports.verifyConditions = (config, context) => {
const { env } = context
Expand Down Expand Up @@ -62,6 +63,12 @@ exports.publish = async (config, context) => {
const { pkgRoot } = config
const { env } = context

await buildApp({
cwd: pkgRoot,
mode: 'production',
verify: true,
})

await publishAppHub({
cwd: pkgRoot,
apikey: env.APP_HUB_TOKEN,
Expand Down

0 comments on commit 3db46dd

Please sign in to comment.