Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gitlab-com
migration
Commits
3d7aa2bd
Commit
3d7aa2bd
authored
Aug 01, 2018
by
Emanuel Calvo
Committed by
Matteo Melli
Aug 03, 2018
Browse files
Pushed scirp scheleton
parent
7c83f328
Changes
3
Hide whitespace changes
Inline
Side-by-side
bin/database-wrangler/migration
0 → 100755
View file @
3d7aa2bd
#!/bin/bash
[[
$#
-lt
1
]]
&&
{
echo
"Specify the environment"
;
exit
1
;
}
ENVIRONMENT
=
$1
source
.env_
${
ENVIRONMENT
}
# That is, .env_staging or .env_production
source
utilities
source
steps_
${
ENVIRONMENT
}
# Failover steps go here
#
function
00_test
(){
echo
"Running things inside"
return
$1
}
# Test
do_step 00_test 0
# force OK
do_step 00_test 1
# Force failing
echo
"menu"
do_menu
bin/database-wrangler/steps_test
0 → 100644
View file @
3d7aa2bd
#!/bin/bash
options
=(
00_step 01_step
)
function
00_step
(){
echo
"Running things inside"
return
$1
}
function
01_step
(){
echo
"Running things inside"
return
$1
}
bin/database-wrangler/utilities
0 → 100644
View file @
3d7aa2bd
#!/bin/bash
function
do_step
(){
echo
"Executing:
$@
"
"
$@
"
||
{
echo
"Step
`
$@
`
Failed."
;
exit
2
;
}
\
&&
echo
"Step
`
$@
`
ran OK"
}
function
do_menu
(){
echo
"echo
$options
"
while
read
opt
do
echo
$opt
done
< <
(
echo
$options
)
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment