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

Allow different git-ftp-include for each scope #583

Open
rhengles opened this issue Jul 4, 2020 · 2 comments
Open

Allow different git-ftp-include for each scope #583

rhengles opened this issue Jul 4, 2020 · 2 comments
Labels
enhancement New feature or improvement

Comments

@rhengles
Copy link

rhengles commented Jul 4, 2020

Enhancement

As stated on #351, paths on left side of colon are relative to Git working directory and not of the syncroot path. Why is that?

I guess the 'scopes' feature are meant to upload always the same code to different servers.

But I have a different usecase. I have different directories that need to be uploaded to different servers. This is becoming very common with git monorepos. I could not find a tool better suited to me than git-ftp, it knows the difference between commints and only uploads changed files.

But I kind of need to have different '.git-ftp-include' files for each scope. The solution I have come up with is the following shell script file:

rm .git-ftp-include

cp .git-ftp-include-back .git-ftp-include

mv ./backend/api/vendor ./vendor

git ftp push -v -s back

mv ./vendor ./backend/api/vendor

Because the include file takes files from the root instead of the syncroot, I have to copy my folder from syncroot to root. I also need to change my include file according to the scope.

I guess an easy way to solve this would be to add an configuration to the scope specifying what include file to use, instead of using the generic '.git-ftp-include'.

Environment

Please copy the output of the following commands.

echo "$SHELL"
uname -a
git-ftp version

# output:
/bin/bash
Linux RAFAEL-PC 4.4.0-18362-Microsoft #836-Microsoft Mon May 05 16:04:00 PST 2020 
x86_64 x86_64 x86_64 GNU/Linux
git-ftp version 1.6.0
@LukasFritzeDev LukasFritzeDev added the enhancement New feature or improvement label Jul 4, 2020
@LukasFritzeDev
Copy link
Collaborator

Thanks for this idea. I think it’s a good idea and adding an option to specify the file name shouldn’t be very complicated.

Do you have the time to provide a pull request?

@rhengles
Copy link
Author

rhengles commented Jul 4, 2020

@LukasFritzeDev

I'm glad you liked it 😊

I'd really love to contribute, but I'm not experienced with shell scripts, I only know the basics 🤦

Maybe it would also be necessary to add an option to make the paths in the include file to the left of colon to be relative to the syncroot? Because changing that behaviour without an option would be a breaking change... But I don't think it make much sense to upload from working directory instead of syncroot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

2 participants