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

Add Feature: Set Logfile name via config #604

Open
KentonMurray opened this issue Mar 6, 2021 · 2 comments
Open

Add Feature: Set Logfile name via config #604

KentonMurray opened this issue Mar 6, 2021 · 2 comments
Labels
enhancement New feature or improvement

Comments

@KentonMurray
Copy link

I use git-ftp to host my website. My hosting provider does not allow .log files to be uploaded through their FTP server. This generates a 553 error. To get around this, I had to build this from source, but modifying

DEPLOYED_SHA1_FILE=".git-ftp.log"
DEPLOYED_SHA1_FILE=".git-ftp.log" to a file format that was allowed. It would be nice if this was able to be set through the config file.

I can submit a pull request if desired, but I am not too familiar with the code. What I think it would look like:

I think the following function needs to be changed

set_deployed_sha1_file() {
	DEPLOYED_SHA1_FILE="$(get_config deployedsha1file "$DEPLOYED_SHA1_FILE")"
}

git-ftp/git-ftp

Line 386 in 057f7d8

DEPLOYED_SHA1_FILE="$(get_config deployedsha1file "$DEPLOYED_SHA1_FILE")"

My understanding is that $DEPLOYED_SHA1_FILE is hardcoded in at:

DEPLOYED_SHA1_FILE=".git-ftp.log"

If I'm understanding the code correctly, in the set_deployed_sha1_file function, when get_config() is called, it is passing this hardcoded value. It would be nice to have the option to pass

git-ftp/git-ftp

Line 223 in 057f7d8

. git config git-ftp.deployedsha1file mySHA1File
The default at this line could be ".git-ftp.log" but allow for users to customize.

@mkllnk
Copy link
Member

mkllnk commented Mar 7, 2021

That's a great suggestion. Can you open a pull request?

@KentonMurray
Copy link
Author

New functionality:

git ftp init -vv

Sun Mar 7 13:49:35 EST 2021: The remote sha1 is saved in file '.git-ftp.log'.

git ftp init -vv --deployedsha1file TEST

Sun Mar 7 13:49:35 EST 2021: The remote sha1 is saved in file 'TEST.log'.

git config git-ftp.deployedsha1file "TEST2.log"
git ftp init -vv
Sun Mar 7 13:49:35 EST 2021: The remote sha1 is saved in file 'TEST2.log'.

@LukasFritzeDev LukasFritzeDev added the enhancement New feature or improvement label Mar 21, 2021
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

3 participants