scijava / scijava-scripts

Shell scripts for scientific projects written in Java
The Unlicense
15 stars 16 forks source link

travisify: make sure build.sh is committed as executable on Windows #25

Closed imagejan closed 4 years ago

imagejan commented 6 years ago

When running travisify.sh on Windows (Git Bash), the committed build.sh script is not executable. Apparently, setting with chmod isn't sufficient on Windows:

https://github.com/scijava/scijava-scripts/blob/818b9717916d4fc62c3d7c8098448a7b2f0d5f6e/travisify.sh#L137

In my experience, using git update-index is required:

git update-index --chmod=+x .travis/build.sh

My bash scripting skills are limited, so I was unsure where to add this line, but think it would likely belong into the update() function:

https://github.com/scijava/scijava-scripts/blob/818b9717916d4fc62c3d7c8098448a7b2f0d5f6e/travisify.sh#L41-L63

ctrueden commented 4 years ago

@imagejan If you ever find yourself Travisifying anything again on Windows, feel free to add the git update-index --chmod=+x .travis/build.sh line to the script yourself where it might work, run the script, and see how it goes? I don't regularly use Windows, but I could at least test that the addition of such a line doesn't break anything on macOS or Linux.