#!/bin/bash
# 检查当前分支是否为 devcurrent_branch=$(git rev-parse --abbrev-ref HEAD)if["$current_branch" !="dev"];thenecho"Error: This script should only be run on the dev branch."exit1fi# 设置 CI 变量并推送git push origin dev -o ci.variable="RUN_PIPELINE=true"echo"Pushed to dev branch with pipeline trigger."
#!/bin/bash
# 检查当前分支是否为 devcurrent_branch=$(git rev-parse --abbrev-ref HEAD)if["$current_branch" !="dev"];thenecho"Error: This script should only be run on the dev branch."exit1fi# 设置 CI 变量并推送git push origin dev -o ci.variable="RUN_PIPELINE=true" -o ci.variable="DEFINE_NAME=$1"echo"Pushed to dev branch with pipeline trigger."