File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,20 @@ jobs:
4545 - name : Create version branch if not exists
4646 if : github.ref_name == 'main'
4747 run : |
48- BOT_VERSION=$(node -p "require('./bot/package.json').version")
49- BRANCH_NAME="v${BOT_VERSION}"
48+ if [ -f bot/package.json ]; then
49+ BOT_VERSION=$(node -p "require('./bot/package.json').version")
50+ BRANCH_NAME="v${BOT_VERSION}"
5051
51- # sprawdź czy branch istnieje w remote
52- if git ls-remote --exit-code origin $BRANCH_NAME; then
53- echo "Branch $BRANCH_NAME already exists"
54- else
55- echo "Creating branch $BRANCH_NAME"
56- git checkout -b $BRANCH_NAME
57- git push origin $BRANCH_NAME
58- git checkout main
52+ # sprawdź czy branch istnieje w remote
53+ if git ls-remote --exit-code origin $BRANCH_NAME; then
54+ echo "Branch $BRANCH_NAME already exists"
55+ else
56+ echo "Creating branch $BRANCH_NAME"
57+ git checkout -b $BRANCH_NAME
58+ git push origin $BRANCH_NAME
59+ git checkout main
60+ fi
61+ fi
5962
6063 # 5️⃣ Tworzenie ZIP-ów
6164 - name : Create ZIP files
You can’t perform that action at this time.
0 commit comments