forked from dappnode/DAppNode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathafter_deploy.sh
More file actions
36 lines (29 loc) · 1.46 KB
/
Copy pathafter_deploy.sh
File metadata and controls
36 lines (29 loc) · 1.46 KB
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
36
# > This script is designed to be run within a travis CI job, on the after_deploy step
# > The will do the following:
# 1. Create a new branch with the next version number
# 2. Commit the new*new versions of the docker-compose.yml and dappnode_package.json
# 3. Open a pull request to master
# > How to include the script in a .travis.yml
# jobs:
# include:
# - stage: release
# after_deploy:
# - wget -O - https://raw.githubusercontent.com/dappnode/DAppNode/<path-to-script>/after_deploy.sh | bash
echo "Running DAppNode travis CI after_deploy.sh script"
# NOTE: git user and remote origin should be already configured from the before script
# 1. Create a new branch with the next version number
# Check if the dappnodesdk is available
dappnodesdk --help
export FUTURE_VERSION=$(dappnodesdk increase patch)
echo "dappnodesdk increase patch output: $FUTURE_VERSION"
export BRANCH_NAME="v${FUTURE_VERSION}"
echo "Run dappnodesdk and increased version to FUTURE_VERSION: $FUTURE_VERSION"
git checkout -b $BRANCH_NAME
# 2. Commit the new*new versions of the docker-compose.yml and dappnode_package.json
git add "dappnode_package.json"
git add "docker-compose.yml"
git commit -m "Advance manifest and docker-compose versions to new version: $FUTURE_VERSION"
git push origin $BRANCH_NAME
# 3. Open a pull request to master
# It's not straight forward so this step will be skipped by now.
echo "Successfully completed DAppNode travis CI after_deploy.sh script"