Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@
<a href="Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Classes/AtElem.html">AtElem</a>

</li>
<li class="nav-group-task">
<a href="Classes/BaseModal.html">BaseModal</a>

</li>
<li class="nav-group-task">
<a href="Classes/CallbackProxy.html">CallbackProxy</a>

</li>
<li class="nav-group-task">
<a href="Classes/ConversationInfo.html">ConversationInfo</a>

</li>
<li class="nav-group-task">
<a href="Classes/CustomElem.html">CustomElem</a>

</li>
<li class="nav-group-task">
<a href="Classes/FileElem.html">FileElem</a>
Expand Down
14 changes: 7 additions & 7 deletions scripts/githooks/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
chmod +x scripts/githooks/pre-commit.sh
chmod +x scripts/githooks/pre-commit.sh


#!/usr/bin/env bash
chmod +x scripts/githooks/pre-commit.sh
#!/usr/bin/env bash
Expand Down Expand Up @@ -41,8 +41,8 @@ RED="\e[31m"
ENDCOLOR="\e[0m"

printMessage() {
chmod +x scripts/githooks/pre-commit.sh
chmod +x scripts/githooks/pre-commit.sh


printf "${YELLOW}openim : $1${ENDCOLOR}\n"
}

Expand All @@ -60,7 +60,7 @@ printMessage "Running local openim pre-commit hook."
# https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md
# TODO! GIT_FILE_SIZE_LIMIT=50000000 git commit -m "test: this commit is allowed file sizes up to 50MB"
# Maximum file size limit in bytes
limit=${GIT_FILE_SIZE_LIMIT:-50000000} # Default 50MB
limit=${GIT_FILE_SIZE_LIMIT:-2000000} # Default 2MB
limitInMB=$(( $limit / 1000000 ))

function file_too_large(){
Expand All @@ -70,7 +70,7 @@ function file_too_large(){
filesize=$(( $1 \/ 2**20 ))\ncat <<HEREDOC

File $filename is $filesize MB, which is larger than github's maximum
file size (2 MB). We will not be able to push this file to GitHub.
file size (20 MB). We will not be able to push this file to GitHub.
The maximum file size allowed is 2MB.
Commit aborted

Expand Down Expand Up @@ -100,7 +100,7 @@ done

if $shouldFail
then
printMessage "If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=42000000 for 42MB. Or, commit with the --no-verify switch to skip the check entirely."
printMessage "If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=20000000 for 20MB. Or, commit with the --no-verify switch to skip the check entirely."
printError "Commit aborted"
exit 1;
fi
Expand Down