Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts should be executable #602

Open
GitMensch opened this issue Sep 18, 2018 · 8 comments
Open

scripts should be executable #602

GitMensch opened this issue Sep 18, 2018 · 8 comments

Comments

@GitMensch
Copy link
Contributor

@fesch Can you please do the following on the make branch?
git update-index --chmod=+x makeBigJar makeJar makeStructorizer startStructorizerAgain structorizer.sh Arranger.sh

Additional question: I want to not run but only compile/create the jar files, should I add a -start option to provide the recent behavior or a -nostart / -no-start option to suppress it?

fesch added a commit that referenced this issue Sep 18, 2018
@codemanyak
Copy link
Collaborator

codemanyak commented Sep 18, 2018

@GitMensch
Bob did the commit 9041bbd on the master branch, so you will have to pull it to the make branch.
No idea whether the commit had a sustainable effect (can't test this on a Windows machine), but the 100 $ question is whether the executable flag will survive the next merge with the bugfix branch where I contributed changes to some make files relating to the bean shell update (discussed in #594).
ADDED:
Albeit, command git update-index suggests that the mode flags are held with the "folder" (more correctly the register) rather than with the file itself, so it might have a chance.

GitMensch added a commit to GitMensch/Structorizer.Desktop that referenced this issue Sep 18, 2018
Trying to do fesch#602, did it work?
@GitMensch
Copy link
Contributor Author

I've merged fesch/master to GitMensch/master via GitHub, that obviously did not work, the result is identical (you can even see the failing CI-build here ;-)

Build started
git clone -q --branch=master https://github.com/GitMensch/Structorizer.Desktop.git /home/appveyor/projects/structorizer-desktop
git checkout -qf 760ce009983e448787ef3ff8bebc793de01ad214
Running "build_script" scripts
./makeStructorizer
./makeBigJar
bash: ./makeStructorizer: Permission denied
bash: ./makeBigJar: Permission denied
Command exited with code 126
Build failed

But inspecting the git history of fesch/master doesn't show the index update (neither here nor in git cmd), I'm unsure if the index was updated with the executable bit and committed.

In the meanwhile @fesch:

Additional question: I want to not run but only compile/create the jar files, should I add a -start option to provide the recent behavior or a -nostart / -no-start option to suppress it?

@fesch
Copy link
Owner

fesch commented Sep 19, 2018

@GitMensch I have no idea what -start nor what -nostart does or is :-/

@GitMensch
Copy link
Contributor Author

GitMensch commented Sep 19, 2018

@fesch

The current behavior of all makeXYZ scripts is to start the application after it was built. I want to add a command line option to these and would prefer to start -start, effectively changing the current behavior (because those scripts are called "make", not "start").
If you request I'll keep the current behavior adding a -nostart (or -nostart or -makeonly) option to suppress the start.

@fesch
Copy link
Owner

fesch commented Sep 19, 2018

I don't use any of these scripts, so you are free to change them so that they fit your needs.

@GitMensch
Copy link
Contributor Author

Just rechecked: the scripts (at least the make* ones) are still not executable.

Can anyone try again, possibly after merging #803, to set the executable bit?
git update-index --chmod=+x makeBigJar makeJar makeStructorizer startStructorizerAgain structorizer.sh Arranger.sh then push the change?

@codemanyak
Copy link
Collaborator

@GitMensch
Well, I suppose you have successfully achieved this in another GitHub project. Otherwise I would have may doubts that it is feasible at all considering the circumstance that the UNIX mode flags are some OS-specific thing. Contributing from a Windows platform where there are no executible bits, I wonder what would happen on a pull.
Perhaps it makes more sense to provide the suited shell command (chmod) in the README.md file, such that an adopter may simply copy and execute it after having downloaded or cloned the sources?

@GitMensch
Copy link
Contributor Author

The VCS client is responsible for the flags - it cares for eol-style "native/lf/crlf" and also for the executable bit and other related meta data like "ignore" rules.
Parts that are not relevant (like the executable bit on a "normal" Windows machine) are just skipped. The executable bit is often only "checked" on the initial check-out.

This is true for svn and git and likely a bunch of other VCS clients, it is just important that the metadata is set on the server repo.

I don't think the README is a good place - the tar-file will already be correct (the auto-generated only if the metadata says it so) and a developer doing a checkout on a non-windows machine will likely know how to handle this. For "developer convenience" (both checkout and the auto-generated tar) it still would be nice to have the metadata correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants