Alexey-T / CudaText_up

Bash script to download CudaText sources (all packages) and compile them. Requires Lazarus 2.0+.
MIT License
15 stars 10 forks source link

switch bgrabitmap to custom branch #24

Closed Alexey-T closed 1 year ago

Alexey-T commented 1 year ago

@veksha I made last commit which changes current branch for 'bgrabitmap'. after cloning. i don't know how to fix code to keep that branch after pulling too. i am weak in bash.

veksha commented 1 year ago

Hi. try this:

diff --git a/cudaup.sh b/cudaup.sh
index 8f5d71f..9fb2c44 100755
--- a/cudaup.sh
+++ b/cudaup.sh
@@ -138,6 +138,11 @@ then
                stashed=true
            fi

+           # we need custom branch of 'bgrabitmap' for pulling too
+           if [[ "$temp" == "bgrabitmap" && "$(git symbolic-ref --short HEAD)" != "dev-bgrabitmap" ]]; then
+               git checkout dev-bgrabitmap
+           fi
+
            originmaster=$(git rev-parse --abbrev-ref HEAD@{upstream}) # origin/master
            origin_master=$(echo $originmaster | sed 's#/# #')         # origin master
veksha commented 1 year ago

but i'm not sure. needs testing.

Alexey-T commented 1 year ago

on pull, you suggested '--depth 1' and '--no-tags'. they will break branches, right?. needs a fix?

veksha commented 1 year ago
  1. i don't think it will break branches. why? BTW, that was not suggested by me, but by other user.

  2. maybe add "git fetch" to my diff (to be sure that branch exists)?

    if [[ "$temp" == "bgrabitmap" && "$(git symbolic-ref --short HEAD)" != "dev-bgrabitmap" ]]; then
    git fetch
    git checkout dev-bgrabitmap
    fi
Alexey-T commented 1 year ago

@veksha @mix-7 i now reverted last change. because bgrabitmap was merged 'dev-.....' branch into 'master' branch.