Skip to content

Commit

Permalink
Allow skipping compilation in deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
polarker committed Apr 14, 2024
1 parent 6fb615a commit e7fb77b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/cli/src/deployment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,12 +563,14 @@ export async function deploy<Settings = unknown>(
const projectRootDir = path.resolve(process.cwd())
const prevProjectArtifact = await ProjectArtifact.from(projectRootDir)
const artifactDir = configuration.artifactDir ?? DEFAULT_CONFIGURATION_VALUES.artifactDir
await Project.build(
configuration.compilerOptions,
path.resolve(process.cwd()),
configuration.sourceDir ?? DEFAULT_CONFIGURATION_VALUES.sourceDir,
artifactDir
)
if (configuration.skipCompile !== true) {
await Project.build(
configuration.compilerOptions,
path.resolve(process.cwd()),
configuration.sourceDir ?? DEFAULT_CONFIGURATION_VALUES.sourceDir,
artifactDir
)
}

// When the contract has been deployed previously, and the contract
// code has changed, ask the user to confirm whether to redeploy the contract
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface Configuration<Settings = unknown> {
deployToMultipleGroupsInParallel?: boolean
deploymentScriptDir?: string
compilerOptions?: CompilerOptions
skipCompile?: boolean

networks: Record<NetworkId, Network<Settings>>

Expand Down

0 comments on commit e7fb77b

Please sign in to comment.