File tree Expand file tree Collapse file tree 6 files changed +87
-1
lines changed 
.github/automatic_versioning_scripts Expand file tree Collapse file tree 6 files changed +87
-1
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ 
3+ pull_and_rebase () {
4+     #  Get the current branch name
5+     CURRENT_BRANCH=$( git rev-parse --abbrev-ref HEAD) 
6+ 
7+     #  Check if the remote branch exists
8+     if  git show-ref --quiet --verify " refs/remotes/origin/$CURRENT_BRANCH " ;  then 
9+         #  Remote branch exists, attempt to pull with rebase
10+         if  !  git pull origin " $CURRENT_BRANCH " ;  then 
11+             echo  " Rebase failed. Attempting to abort the rebase." 
12+             if  git rebase --abort;  then 
13+                 echo  " Rebase aborted. Please resolve conflicts or merge changes manually." 
14+             else 
15+                 echo  " No rebase in progress. Please check the status of the repository." 
16+             fi 
17+             exit  1
18+         fi 
19+     else 
20+         echo  " Remote branch does not exist. Skipping pull." 
21+     fi 
22+ }
23+ 
24+ commit_and_push () {
25+     COMMIT_MSG=$1 
26+     #  Commit and push
27+     git commit -m " $COMMIT_MSG " 
28+     if  !  git push origin " $( git rev-parse --abbrev-ref HEAD) " ;  then 
29+         echo  " Push failed. Please check for any issues and try again." 
30+         exit  1
31+     fi 
32+ }
33+ 
34+ 
35+ commit_automatic_trigger () {
36+     COMMIT_MSG=$1 
37+     #  Check for staged changes
38+     if  git diff --cached --quiet;  then 
39+         #  No changes staged, proceed with an empty commit
40+         git commit --allow-empty -m " $COMMIT_MSG " 
41+         echo  " Trigger commit created." 
42+     else 
43+         #  Staged changes detected, fail the script
44+         echo  " Error: Staged changes detected. Cannot proceed with trigger commit." 
45+         exit  1
46+     fi 
47+ }
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ 
3+ #  Determine the directory where the script is located
4+ SCRIPT_DIR=$( dirname " $( realpath " $0 " ) " ) 
5+ 
6+ #  Source the utils script from the same directory as trigger-auto
7+ .  " $SCRIPT_DIR /git-operations" 
8+ 
9+ 
10+ commit_automatic_trigger " $*  --pre-release --build" 
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ 
3+ #  Determine the directory where the script is located
4+ SCRIPT_DIR=$( dirname " $( realpath " $0 " ) " ) 
5+ 
6+ #  Source the utils script from the same directory as trigger-auto
7+ .  " $SCRIPT_DIR /git-operations" 
8+ 
9+ pull_and_rebase
10+ commit_and_push " $*  --pre-release --build" 
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ 
3+ #  Determine the directory where the script is located
4+ SCRIPT_DIR=$( dirname " $( realpath " $0 " ) " ) 
5+ 
6+ #  Source the utils script from the same directory as trigger-auto
7+ .  " $SCRIPT_DIR /git-operations" 
8+ 
9+ pull_and_rebase
10+ commit_and_push " $*  --build" 
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ 
3+ #  Determine the directory where the script is located
4+ SCRIPT_DIR=$( dirname " $( realpath " $0 " ) " ) 
5+ 
6+ #  Source the utils script from the same directory as trigger-auto
7+ .  " $SCRIPT_DIR /git-operations" 
8+ 
9+ pull_and_rebase
10+ commit_and_push " $*  --pre-release --debug" 
Original file line number Diff line number Diff line change 11FROM  golang:1.17.3@sha256:b5bfe0255e6fac7cec1abd091b5cc3a5c40e2ae4d09bafbe5e94cb705647f0fc as builder
22
33ARG  TARGETARCH
4- 
54ENV  GO111MODULE=on \
65    CGO_ENABLED=0  \
76    GOARCH=${TARGETARCH} \
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments