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

publishGhPages is skipped if prepareGhPages was run previously #221

Closed
rodm opened this issue Nov 2, 2016 · 1 comment
Closed

publishGhPages is skipped if prepareGhPages was run previously #221

rodm opened this issue Nov 2, 2016 · 1 comment
Labels
Milestone

Comments

@rodm
Copy link

rodm commented Nov 2, 2016

Running the prepareGhPages and then running publishGhPages results in the publish task being skipped and nothing being published.

> ./gradlew -S --info publishGhPages
Starting Build
In ~/.gradle/init.gradle
Settings evaluated using settings file '/Users/rod/development/test-github-pages/settings.gradle'.
Projects loaded. Root project using build file '/Users/rod/development/test-github-pages/build.gradle'.
Included projects: [root project 'test-github-pages']
Evaluating root project 'test-github-pages' using build file '/Users/rod/development/test-github-pages/build.gradle'.
All projects evaluated.
Selected primary task 'publishGhPages' from project :
Tasks to be executed: [task ':prepareGhPages', task ':publishGhPages']
:prepareGhPages (Thread[main,5,main]) started.
:prepareGhPages
Skipping task ':prepareGhPages' as it is up-to-date (took 0.038 secs).
:prepareGhPages UP-TO-DATE
:prepareGhPages (Thread[main,5,main]) completed. Took 0.063 secs.
:publishGhPages (Thread[main,5,main]) started.
:publishGhPages
Skipping task ':publishGhPages' as task onlyIf is false.
:publishGhPages SKIPPED
:publishGhPages (Thread[main,5,main]) completed. Took 0.003 secs.

BUILD SUCCESSFUL

It appears that the publish task is skipped if the prepare task is up-to-date. The onlyIf property of the publish task is set based on what the prepare task does, the publish task should probably determine if it has anything to do regardless of what the prepare task does.

To work around this problem I run the clean task then the jbake and publishGhPages tasks.

@ajoberstar
Copy link
Owner

I'll need to look into this more when I have some time, but likely a bug (as you probably expect).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants