Update .gitlab-ci.yml file

This commit is contained in:
Kewbit 2024-11-27 23:35:47 +00:00
parent c7fdf1ffd1
commit 0db7cb37cf

View file

@ -7,16 +7,11 @@ update_patched_master:
- patched_changes - patched_changes
script: script:
- apk --no-cache add git - apk --no-cache add git
- echo "Setting up Git repository locally..." - echo "Working in custom build directory..."
- git clone http://oauth2:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git /tmp/repo
- cd /tmp/repo
- echo "Fetching all branches..."
- git fetch origin - git fetch origin
- echo "Verifying if patched_changes exists..." - echo "Checking out patched_master branch..."
- if git show-ref --verify --quiet refs/remotes/origin/patched_changes; then - git checkout patched_master || git checkout -b patched_master
echo "patched_changes branch found. Proceeding..."; - echo "Resetting patched_master to patched_changes..."
git checkout patched_master || git checkout -b patched_master; - git reset --hard origin/patched_changes
git reset --hard origin/patched_changes;
fi
- echo "Force-pushing patched_master to match patched_changes..." - echo "Force-pushing patched_master to match patched_changes..."
- git push origin patched_master --force - git push origin patched_master --force