Comments (24)
Are you getting error indicating there's uncommited files ? You can turn on flag to ignore modified files when performing release
from gradle-release.
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.
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.
FYI, those guys decided to revert
from gradle-release.
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.
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.
@eshepelyuk Evgeny, why do you need jgit? Windows compatibility?
from gradle-release.
There is git command line tool for Windows as well, so 1.1 implementation should work.
from gradle-release.
@VodzorD +1
from gradle-release.
Tried to keep most of the tests, but removed the ones that didn't make sense anymore.
from gradle-release.
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.
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.
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.
Just checked 1.2-SNAPSHOT --> Works fine!
from gradle-release.
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.
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.
- What do you mean with clearing gradle cache ? Delete .gradle directory ?
- What init-scripts do you mean ? I just cloning release branch and run gradle release
- 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.
- 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.
- 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. - 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.
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.
is there a new error? turn on debug "-d" when you execute release and see what the issue is.
from gradle-release.
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.
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.
Finally working with my release
branch. Starting experiments on live projects.
Bug potentially could be closed
from gradle-release.
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)
- Leading space inserted for title of pre tag commit HOT 3
- "Extension with name 'release' does not exist" for 3.0.0, Gradle 7.5 and multiproject HOT 1
- Build failing after upgrading to 3.0.0 HOT 3
- Release with protected branch HOT 1
- Update citation files on version change
- Ignoring requireBranch is not possible HOT 4
- Define Release Branch name Template
- 3.0.0 - buildTasks default changed from ['build'] to [] HOT 1
- Releasing doesn't remove "snapshot" from the jar names HOT 4
- :submodule:release stuck at unSnapshotVersion
- Cannot trigger task after release HOT 1
- release does not build HOT 1
- Question: Behavior of plugin while preparing new version commit
- Gradle 9.0: The StartParameter.settingsFile property has been deprecated. HOT 16
- Use updateVersion with args HOT 1
- I have a new idea to incorporate this feature into the plugin for the purpose of using dynamic version dependencies
- Composite build not supported HOT 2
- Failure on releasing jni projects
- Unable to configure releases with protected main branch in Gradle HOT 1
- Failure with Gitlab 16.8.1 (No user exists for uid 503) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gradle-release.