Coder Social home page Coder Social logo

Comments (24)

eshepelyuk avatar eshepelyuk commented on June 19, 2024

Are you getting error indicating there's uncommited files ? You can turn on flag to ignore modified files when performing release

from gradle-release.

bk-mz avatar bk-mz commented on June 19, 2024

I'm afraid this is not an option, because tagging commit will corrupt those symlinks (presumably).

Nevertheless, plugin tells me my files (e.g. symlinks) are modified, and they are not - that means, this behavior of plugin is incorrect and needs to be fixed.

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

Evgeny, is there a work-a-round with jgit for this? Symlinking and git are pretty common and if there isn't a solution I think I will have to revert those changes.

from gradle-release.

bk-mz avatar bk-mz commented on June 19, 2024

FYI, those guys decided to revert

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

I have no idea about symlinks workarounds for jgit. Although I consider usage of symbolic links in source repository really strange use case - the workaround should be provided to people keep using plugin for their needs.
What I can propose, to not discard all the changes, is to maintain two implementations of git for the plugin. One relying on gradle-git and jgit and other relying on git command line client. Certain implementation can be chosen by using a switch plugin property.

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

BTW, I think the tests created during jgit migration can be kept. They can be modified maybe but still can be used for covering git based release process

from gradle-release.

bk-mz avatar bk-mz commented on June 19, 2024

@eshepelyuk Evgeny, why do you need jgit? Windows compatibility?

from gradle-release.

ddrozdov avatar ddrozdov commented on June 19, 2024

There is git command line tool for Windows as well, so 1.1 implementation should work.

from gradle-release.

bk-mz avatar bk-mz commented on June 19, 2024

@VodzorD +1

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

Tried to keep most of the tests, but removed the ones that didn't make sense anymore.

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

I've uploaded a new snapshot, please test to make sure it works and I'll work on doing a release this weekend.

Thanks for the help everyone.

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

NPE for me on preTagCommit

10:30:13.041 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NullPointerException
10:30:13.058 [ERROR] [org.gradle.BuildExceptionReporter]        at release.PluginHelper.exec(PluginHelper.groovy:120)
10:30:13.074 [ERROR] [org.gradle.BuildExceptionReporter]        at release.PluginHelper$exec.callCurrent(Unknown Source)
10:30:13.092 [ERROR] [org.gradle.BuildExceptionReporter]        at release.GitReleasePlugin.gitExec(GitReleasePlugin.groovy:133)
10:30:13.106 [ERROR] [org.gradle.BuildExceptionReporter]        at release.GitReleasePlugin.commit(GitReleasePlugin.groovy:88)
10:30:13.123 [ERROR] [org.gradle.BuildExceptionReporter]        at release.GitReleasePlugin$commit.call(Unknown Source)
10:30:13.138 [ERROR] [org.gradle.BuildExceptionReporter]        at release.ReleasePlugin.commitNewVersion(ReleasePlugin.groovy:211)
10:30:13.156 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:48
3)
10:30:13.172 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.AbstractTask$ClosureTaskAction.execute(AbstractTask.java:46
9)
10:30:13.189 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.TaskStatusNagger$1.execute(TaskStatusNagger.java:78)
10:30:13.205 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.TaskStatusNagger$1.execute(TaskStatusNagger.java:74)
10:30:13.222 [ERROR] [org.gradle.BuildExceptionReporter]        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(E
xecuteActionsTaskExecuter.java:64)

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

Hi Evgeny, could you give some more details as to the state of your repo when you tried this? Also, what are the release flags you're using, and are you using a SNAPSHOT version (dependency or in your own version)? I was not able to reproduce this using the latest snapshot.

from gradle-release.

bk-mz avatar bk-mz commented on June 19, 2024

Just checked 1.2-SNAPSHOT --> Works fine!

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

I've tried several projects and got NPE in all of them. As a reference you can check this - https://github.com/eshepelyuk/gradle-release/tree/release. This is forked plugin repo and special branch release used for release testing

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

Hi Evgeny, I'm not seeing that error. When I checkout the release branch of your project and run 'gradle release', it fails, but it fails because a tag already exists for that version:

[09:58 AM] gradle release
:release
:gradle-release:initScmPlugin
:gradle-release:checkCommitNeeded
:gradle-release:checkUpdateNeeded
:gradle-release:unSnapshotVersion
:gradle-release:confirmReleaseVersion
:gradle-release:checkSnapshotDependencies
:gradle-release:compileJava UP-TO-DATE
:gradle-release:compileGroovy
:gradle-release:processResources UP-TO-DATE
:gradle-release:classes
:gradle-release:jar
:gradle-release:assemble
:gradle-release:compileTestJava UP-TO-DATE
:gradle-release:compileTestGroovy UP-TO-DATE
:gradle-release:processTestResources UP-TO-DATE
:gradle-release:testClasses UP-TO-DATE
:gradle-release:test
:gradle-release:check
:gradle-release:build
:gradle-release:preTagCommit
:gradle-release:createReleaseTag FAILED
:release FAILED
Release process failed, reverting back any changes made by Release Plugin.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':createReleaseTag'.
> Duplicate tag [gradle-release-0.2.4] - [][fatal: tag 'gradle-release-0.2.4' already exists
  ]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 20.892 secs

Could you try clearing out your gradle cache? Also, are you including any other plugins through init-scripts? Trying to figure out what the differences are between environments.

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024
  1. What do you mean with clearing gradle cache ? Delete .gradle directory ?
  2. What init-scripts do you mean ? I just cloning release branch and run gradle release
  3. Could you clone my branch into own repository and try to run gradle release there ? So you wont have conflicts with existing tags

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024
  1. Yes, though you don't need to delete the entire .gradle directory, just the .gradle/caches directory. This is equivalent of deleting the .m2/repository directory.
  2. The init scripts are described here: http://www.gradle.org/docs/current/userguide/init_scripts.html
    Some people use them to install default plugins on all projects so they don't need to be included in each build file. There are other things that can be done with them as well, but I'm guessing you're probably not using them.
  3. Thanks, I was finally able to reproduce the issue there. The error was generated because you're setting the requireBranch to null. I deployed a new snapshot that should fix it, but it's just going to push to 'master' when you set it to null. I remember you mentioning this in another ticket, could you explain what setting it to null is supposed to do? If there is no value the push command ends up looking like git push origin with not branch - at least my version of git complains when this is executed and suggests that I supply a branch like 'master'.

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

Removed .cache directory and now exception disappeared. But there's still a bug.
Property file with version after release is not pushed although tag is created and pushed to remote.
I've checked this on the same release branch

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

is there a new error? turn on debug "-d" when you execute release and see what the issue is.

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

There's no errors / exceptions. Build is successful. Version is updated in property file, tag created and pushed. But property file with updated version is not pushed to remote. Could you try and check with branch I've mentioned above.

from gradle-release.

townsfolk avatar townsfolk commented on June 19, 2024

Hmm. I'm not able to reproduce it with your branch. I checked it out locally then created a local repository from it's contents. When I do the release I see the gradle.properties file being pushed to the local repo. When I create a second clone of the local repo I see the updated file and the tags.

I also tried it on my own test project:
http://sourceforge.net/p/gradlerelease/git/commit_browser

The gradle.properties file is updated and committed.

Do you see the "commitNewVersion" task being run?

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

Finally working with my release branch. Starting experiments on live projects.
Bug potentially could be closed

from gradle-release.

eshepelyuk avatar eshepelyuk commented on June 19, 2024

Tested latest snapshot with live projects - works OK.
Please can you update documentation that requireBranch should be set to empty string to avoid checking branch name before starting release procedures ?

from gradle-release.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.