You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export PROGRESS=0 # Used to track progress of backup
52
+
echo"$PROGRESS"> /tmp/backup-utils-progress
53
+
export PROGRESS_TOTAL=18 # Maximum number of steps in backup
54
+
45
55
# Check to make sure moreutils parallel is installed and working properly
46
56
ghe_parallel_check
47
57
@@ -121,7 +131,7 @@ ghe_restore_check
121
131
# Check to see if there is a running backup
122
132
if [ -h ../in-progress ];then
123
133
124
-
log_error "Error: detected a backup already in progress from a previous version of ghe-backup. \nIf there is no backup in progress anymore, please remove \nthe $GHE_DATA_DIR/in-progress file."1>&2
134
+
log_error "Detected a backup already in progress from a previous version of ghe-backup. \nIf there is no backup in progress anymore, please remove \nthe $GHE_DATA_DIR/in-progress file.">&2
125
135
exit 1
126
136
fi
127
137
@@ -306,6 +316,7 @@ else
306
316
steps="${failures///, }"
307
317
ghe_remote_logger "Completed backup from $(hostname) / snapshot $GHE_SNAPSHOT_TIMESTAMP with failures: ${steps}."
308
318
log_error "Error: Snapshot incomplete. Some steps failed: ${steps}. "
## derive the proper stable branch. if the base branch is "master" the stable branch is just "stable"
348
+
## if the base branch is a release branch, the stable branch will be "x.y-stable"
349
+
result=""
350
+
ifbranch == "master"
351
+
result="stable"
352
+
else
353
+
result=branch.gsub(/-main$/,"-stable")
354
+
end
355
+
356
+
result
357
+
end
358
+
336
359
#### All the action starts ####
337
360
if $PROGRAM_NAME == __FILE__
338
361
begin
362
+
## validate base branch. this must either be "master" or a release branch which will match the pattern "x.y-main"
363
+
raise"The branch #{GH_BASE_BRANCH} is not valid for releasing backup-utils. branch name must be master or match x.y-main"if !is_base_branch_valid?(GH_BASE_BRANCH)
0 commit comments