forked from nicegram/Nicegram-iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
35 lines (31 loc) · 1.19 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
image: 'atlassian/default-image:3'
pipelines:
custom:
push-to-github-repo:
- variables:
- name: TargetBranch
default: beta
allowed-values:
- master
- beta
- name: CommitMessage
description: Enter the version and build number (ex. 1.5.5 (255))
- step:
script:
- BB_REPO_PATH=$BITBUCKET_CLONE_DIR
- GH_REPO_PATH=$BITBUCKET_CLONE_DIR/../nicegram-ios-github
- git clone --depth 1 -b $TargetBranch [email protected]:nicegram/Nicegram-iOS.git $GH_REPO_PATH
- cd $GH_REPO_PATH
- git rm -rf .
- git clean -fxd
- cd $BB_REPO_PATH
- git submodule update --recursive --init
- cp -r .git/modules/. $GH_REPO_PATH/.git/modules
- rm -rf .git
- cp -r . $GH_REPO_PATH
- cd $GH_REPO_PATH
- git add .
- git config user.email "[email protected]"
- git config user.name "Denis Shilovich"
- git commit --allow-empty -m "$CommitMessage"
- git push origin $TargetBranch