Skip to content

Add Feature: Set Logfile name via config #604

Open

Description

@KentonMurray

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.

Activity

  1. mkllnk commented on Mar 7, 2021

    @mkllnk
    Member

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

  2. KentonMurray commented on Mar 7, 2021

    @KentonMurray
    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'.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions