Skip to content

Commit

Permalink
[core] Deploy to sanity.studio without basePath (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed Jun 8, 2019
1 parent 11c7cb0 commit fc6cc63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/@sanity/core/src/actions/build/buildStaticAssets.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const rimraf = promisify(rimTheRaf)
const absoluteMatch = /^https?:\/\//i

export default async (args, context) => {
const overrides = args.overrides || {}
const {output, prompt, workDir} = context
const flags = Object.assign(
{minify: true, profile: false, stats: false, 'source-maps': false},
Expand All @@ -32,7 +33,7 @@ export default async (args, context) => {
sourceMaps: flags['source-maps'],
skipMinify: !flags.minify,
profile: flags.profile,
project: config.get('project')
project: Object.assign({}, config.get('project'), overrides.project)
}

await tryInitializePluginConfigs({workDir, output})
Expand Down
3 changes: 2 additions & 1 deletion packages/@sanity/core/src/actions/deploy/deployAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ export default async (args, context) => {
// Always build the project, unless --no-build is passed
const shouldBuild = flags.build
if (shouldBuild) {
const overrides = {project: {basePath: undefined}}
const buildStaticAssets = lazyRequire(require.resolve('../build/buildStaticAssets'))
await buildStaticAssets({extOptions: flags, argsWithoutOptions: []}, context)
await buildStaticAssets({extOptions: flags, argsWithoutOptions: [], overrides}, context)
}

// Ensure that the directory exists, is a directory and seems to have valid content
Expand Down

0 comments on commit fc6cc63

Please sign in to comment.