Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Fix order of node_build and node_publish during publish (#51)
Browse files Browse the repository at this point in the history
Description
===========

A patch to fix a second small error. The build task is now executed
but run after the `node_publish` task which means the package is
still empty. This patch simply forces the order.

Changes
=======

* ![FIX] order of `node_build` and `node_publish`
  • Loading branch information
Larusso authored Apr 1, 2022
1 parent 027183f commit 768218c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ class NodeReleasePluginPublishSpec extends GithubIntegrationSpec {
then:
print(result.standardOutput)
result.success
result.standardOutput.indexOf("Task :node_run_build") < result.standardOutput.indexOf("Task :node_publish")
result.wasExecuted("node_run_build")
result.wasExecuted("npm_publish")
hasPackageOnArtifactory(artifactoryRepoName, packageNameForPackageJson())
Expand Down Expand Up @@ -212,6 +213,7 @@ class NodeReleasePluginPublishSpec extends GithubIntegrationSpec {

then:
result.success
result.standardOutput.indexOf("Task :node_run_build") < result.standardOutput.indexOf("Task :node_publish")
result.wasExecuted("node_run_build")
result.wasExecuted("node_publish")
result.wasExecuted("npm_publish")
Expand Down
4 changes: 2 additions & 2 deletions src/main/groovy/wooga/gradle/node/NodeReleasePlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ class NodeReleasePlugin implements Plugin<Project> {
nodeBuildTask.dependsOn engineScopedBuildTask
assembleTask.dependsOn nodeBuildTask
// Set up publish lifecycle dependencies
nodePublishTask.dependsOn engineScopedPublishTask
publishTask.dependsOn nodeBuildTask, nodePublishTask
nodePublishTask.dependsOn nodeBuildTask, engineScopedPublishTask
publishTask.dependsOn nodePublishTask
githubPublishTask.mustRunAfter nodePublishTask

// TODO: Add custom tasks previously provided by the nebula release plugin
Expand Down

0 comments on commit 768218c

Please sign in to comment.