Edits for gitPush so that it works.
Again. :(
This commit is contained in:
		
							parent
							
								
									75cb35b954
								
							
						
					
					
						commit
						8c61f4a51c
					
				| @ -12,6 +12,15 @@ if [ ! -d "$REPO_DIR/.git" ]; then | |||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| cd "$REPO_DIR" | cd "$REPO_DIR" | ||||||
|  | 
 | ||||||
|  | # Abort previous rebase/cherry-pick if stuck | ||||||
|  | git rebase --abort 2>/dev/null || true | ||||||
|  | git cherry-pick --abort 2>/dev/null || true | ||||||
|  | 
 | ||||||
|  | # Make sure we're on a clean 'main' | ||||||
|  | git checkout main || git checkout -b main origin/main | ||||||
|  | git pull --rebase --autostash | ||||||
|  | 
 | ||||||
| git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}" | git remote set-url origin "https://${GITEA_TOKEN}@${GITURL}/${GITREPOPATH}" | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| @ -25,7 +34,7 @@ git add MirrorListV4 MirrorListV6 OPNS_MirrorListV4 OPNS_MirrorListV6 | |||||||
| if ! git diff --quiet --cached; then | if ! git diff --quiet --cached; then | ||||||
|     echo "[$(date)] Committing and pushing changes..." |     echo "[$(date)] Committing and pushing changes..." | ||||||
|     git commit -m "Auto-update mirror list on $(date -Iseconds)" |     git commit -m "Auto-update mirror list on $(date -Iseconds)" | ||||||
|     git pull --rebase --autostash |     # git pull --rebase --autostash | ||||||
|     git push --quiet |     git push --quiet | ||||||
|     echo "[$(date)] Changes pushed." |     echo "[$(date)] Changes pushed." | ||||||
| else | else | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user