ajoberstar / reckon

Infer a project's version from your Git repository.
Apache License 2.0
191 stars 28 forks source link

Remove the restriction of clean repo for pushing a final version? #128

Closed tsanborn19-zz closed 5 years ago

tsanborn19-zz commented 5 years ago

I have a system that needs to change the execute permissions on a file when the automated build runs, and unfortunately that file cannot be made executable before that time.

That makes it so that I can't push final versions with this plugin, which is extremely disappointing.

Is there any way to disable the clean repo requirement for final versions?

ajoberstar commented 5 years ago

Thank you for your interest in the plugin and for raising this!

Currently, this isn't configurable. Right now, I have no plans to provide configurability for these core assumptions of reckon, which isn't to say I'm not sympathetic to the technical limitations that can sometimes prevent people from meeting them. Not ruling it out in the future, but it's a won't fix for now.

Cinderhaze commented 5 years ago

@treversan - how does reckon behave if you tell git to ignore file permissions, then change it to executable?

https://github.com/Gizra/KnowledgeBase/wiki/How-to-set-Git-to-ignore-chmod-changes

git config core.filemode false

tsanborn19-zz commented 5 years ago

Good call @Cinderhaze

Thanks for the help!

dtrunk90 commented 10 months ago

Another way is to temporarily ignore the file:

git update-index --assume-unchanged "$FILE"
./gradlew doSomeStuff
git update-index --no-assume-unchanged "$FILE"

Source: https://gist.github.com/sloanlance/0f0cb5e9819e11d698a26a623bc649f4