JavierSegoviaCordoba / semver-gradle-plugin

Set projects versions based on git tags and following semantic versioning
https://semver-gradle-plugin.javiersc.com
Other
25 stars 3 forks source link

strange warning about project not being in a git repository? #22

Closed peterfigure closed 2 years ago

peterfigure commented 2 years ago

doesn't appear to impact anything but does print a warning in this multi-module project

> Task :config-versioning:generatePrecompiledScriptPluginAccessors
semver plugin can't work if the project is not a git repository <============== HERE

> Task :config-versioning:compileKotlin
w: Language version 1.4 is deprecated and its support will be removed in a future version of Kotlin

BUILD SUCCESSFUL in 9s
81 actionable tasks: 40 executed, 41 up-to-date

gradle-plugins on  main [!] via ☕ v11.0.13 via 🅺 on ☁️  (us-west-2) on ☁️ xxx(us-east1) took 9s 
❯ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
    modified:   .github/workflows/pushpr.yaml
    modified:   config-versioning/build.gradle.kts
    modified:   config-versioning/src/main/kotlin/com.xxx.gradle.config-versioning.gradle.kts

no changes added to commit (use "git add" and/or "git commit -a")
JavierSegoviaCordoba commented 2 years ago

That was the fix for this one https://github.com/JavierSegoviaCordoba/semver-gradle-plugin/issues/18

Is it appearing even if the project is a git repository?

peterfigure commented 2 years ago

it appears so :( see git status output

JavierSegoviaCordoba commented 2 years ago

I can't reproduce it in my repositories, can you share a repro?

peterfigure commented 2 years ago

private repo unfortunately, I'll try to put together another repo and see if it replicates the problem

JavierSegoviaCordoba commented 2 years ago

Fixed, if a tag is pushed two times, the task will fail (which is normal). Now instead of checking if there is a crash, plugin checks if .gitexists.