File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -65,18 +65,22 @@ function create-deploy-request {
65
65
if [ -n " $CI " ]; then
66
66
echo " ::set-output name=DEPLOY_REQUEST_URL::$deploy_request "
67
67
echo " ::set-output name=DEPLOY_REQUEST_NUMBER::$deploy_request_number "
68
- create-diff-for-ci " $DB_NAME " " $ORG_NAME " " $deploy_request_number "
68
+ create-diff-for-ci " $DB_NAME " " $ORG_NAME " " $deploy_request_number " " $BRANCH_NAME "
69
69
fi
70
70
}
71
71
72
72
function create-diff-for-ci {
73
73
local DB_NAME=$1
74
74
local ORG_NAME=$2
75
75
local deploy_request_number=$3
76
+ local BRANCH_NAME=$4
76
77
77
78
local deploy_request=" https://app.planetscale.com/${ORG_NAME} /${DB_NAME} /deploy-requests/${deploy_request_number} "
78
79
local BRANCH_DIFF=" Diff could not be generated for deploy request $deploy_request "
79
80
81
+ # updating schema for branch
82
+ pscale branch refresh-schema " $DB_NAME " " $BRANCH_NAME " --org " $ORG_NAME "
83
+
80
84
local lines=" "
81
85
# read shell output line by line and assign to variable
82
86
while read -r line; do
@@ -123,7 +127,7 @@ function create-deployment {
123
127
exit 1
124
128
fi
125
129
else
126
- create-diff-for-ci " $DB_NAME " " $ORG_NAME " " $deploy_request_number "
130
+ create-diff-for-ci " $DB_NAME " " $ORG_NAME " " $deploy_request_number " " $BRANCH_NAME "
127
131
fi
128
132
129
133
pscale deploy-request deploy " $DB_NAME " " $deploy_request_number " --org " $ORG_NAME "
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ DEPLOY_REQUEST_NUMBER="$3"
13
13
14
14
. ps-create-helper-functions.sh
15
15
create-schema-change " $DB_NAME " " $BRANCH_NAME " " $ORG_NAME " " $DDL_STATEMENTS "
16
- create-diff-for-ci " $DB_NAME " " $ORG_NAME " " $DEPLOY_REQUEST_NUMBER "
16
+ create-diff-for-ci " $DB_NAME " " $ORG_NAME " " $DEPLOY_REQUEST_NUMBER " " $BRANCH_NAME "
You can’t perform that action at this time.
0 commit comments