Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
2f93224c
Commit
2f93224c
authored
May 01, 2013
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy tgz and/or rpm files to s3
parent
1ec9f715
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
scripts/tokutek.make.mysql.bash
scripts/tokutek.make.mysql.bash
+18
-14
No files found.
scripts/tokutek.make.mysql.bash
View file @
2f93224c
#!/bin/bash
#!/bin/bash
set
-e
function
usage
()
{
function
usage
()
{
echo
"make mysql and copy the tarballs to an amazon s3 bucket"
echo
"make mysql and copy the tarballs to an amazon s3 bucket"
return
1
return
1
...
@@ -10,28 +8,35 @@ function usage() {
...
@@ -10,28 +8,35 @@ function usage() {
# copy build files to amazon s3
# copy build files to amazon s3
function
copy_to_s3
()
{
function
copy_to_s3
()
{
local
s3_build_bucket
=
$1
;
local
s3_release_bucket
=
$2
local
s3_build_bucket
=
$1
;
local
s3_release_bucket
=
$2
local
ts
=
$(
date
+%s
)
local
ymd
=
$(
date
+%Y%m%d
-d
@
$ts
)
local
ym
=
$(
date
+%Y%m
-d
@
$ts
)
local
exitcode
=
0
;
local
r
=
0
local
exitcode
=
0
;
local
r
=
0
for
f
in
$(
ls
*
.tar.gz
*
)
;
do
for
f
in
$(
find
.
-maxdepth
1
\(
-name
'*.tar.gz*'
-o
-name
'*.rpm*'
\)
)
;
do
f
=
$(
basename
$f
)
echo
`
date
`
s3put
$s3_build_bucket
$f
echo
`
date
`
s3put
$s3_build_bucket
$f
s3put
$s3_build_bucket
$f
$f
s3put
$s3_build_bucket
$f
$f
r
=
$?
r
=
$?
# index the file by date
# index the file by date
echo
`
date
`
s3put
$s3_build_bucket
$f
$r
echo
`
date
`
s3put
$s3_build_bucket
$f
$r
if
[
$r
!=
0
]
;
then
exitcode
=
1
;
fi
if
[
$r
!=
0
]
;
then
exitcode
=
1
;
fi
d
=
$(
date
+%Y%m%d
)
s3put
$s3_build_bucket
-date
$ymd
/
$f
/dev/null
s3put
$s3_build_bucket
-date
$d
/
$f
/dev/null
r
=
$?
r
=
$?
echo
`
date
`
s3put
$s3_build_bucket
-date
$d
/
$f
$r
echo
`
date
`
s3put
$s3_build_bucket
-date
$
ym
d
/
$f
$r
if
[
$r
!=
0
]
;
then
exitcode
=
1
;
fi
if
[
$r
!=
0
]
;
then
exitcode
=
1
;
fi
# copy to partition by date
s3mkbucket
$s3_build_bucket
-
$ym
s3copykey
$s3_build_bucket
-
$ym
$f
$s3_build_bucket
$f
done
done
if
[[
$git_tag
=
~ tokudb-.
*
]]
;
then
if
[[
$git_tag
=
~ tokudb-.
*
]]
;
then
s3mkbucket
$s3_release_bucket
-
$git_tag
s3mkbucket
$s3_release_bucket
-
$git_tag
if
[
$r
!=
0
]
;
then
if
[
$r
!=
0
]
;
then
exitcode
=
1
exitcode
=
1
else
else
for
f
in
$(
ls
*
.tar.gz
*
)
;
do
for
f
in
$(
find
.
-maxdepth
1
\(
-name
'*.tar.gz*'
-o
-name
'*.rpm*'
\)
)
;
do
f
=
$(
basename
$f
)
echo
`
date
`
s3copykey
$s3_release_bucket
-
$git_tag
$f
echo
`
date
`
s3copykey
$s3_release_bucket
-
$git_tag
$f
s3copykey
$s3_release_bucket
-
$git_tag
$f
tokutek-mysql-build
$f
s3copykey
$s3_release_bucket
-
$git_tag
$f
$s3_build_bucket
$f
r
=
$?
r
=
$?
echo
`
date
`
s3copykey
$s3_release_bucket
-
$git_tag
$f
$r
echo
`
date
`
s3copykey
$s3_release_bucket
-
$git_tag
$f
$r
if
[
$r
!=
0
]
;
then
exitcode
=
1
;
fi
if
[
$r
!=
0
]
;
then
exitcode
=
1
;
fi
...
@@ -68,24 +73,23 @@ done
...
@@ -68,24 +73,23 @@ done
if
[
-z
$mysqlbuild
]
;
then
exit
1
;
fi
if
[
-z
$mysqlbuild
]
;
then
exit
1
;
fi
# parse the mysqlbuild
# parse the mysqlbuild
string
parse_mysqlbuild
$mysqlbuild
parse_mysqlbuild
$mysqlbuild
if
[
$?
!=
0
]
;
then
exit
1
;
fi
if
[
$?
!=
0
]
;
then
exit
1
;
fi
# make the build dir
# make the build dir
build_dir
=
build-tokudb-
$tokudb_version
build_dir
=
build-tokudb-
$tokudb_version
if
[
-d
builds
]
;
then
build_dir
=
builds/
$build_dir
;
fi
if
[
-d
builds
]
;
then
build_dir
=
builds/
$build_dir
;
fi
mkdir
$build_dir
if
[
!
-d
$build_dir
]
;
then
mkdir
$build_dir
;
fi
if
[
$?
!=
0
]
;
then
exit
1
;
fi
pushd
$build_dir
pushd
$build_dir
if
[
$?
!=
0
]
;
then
exit
1
;
fi
# make mysql
# make mysql
bash
-x
$HOME
/github/ft-engine/scripts/make.mysql.bash
$make_args
bash
-x
$HOME
/github/ft-engine/scripts/make.mysql.bash
$make_args
if
[
$?
!=
0
]
;
then
exit
1
;
fi
if
[
$?
!=
0
]
;
then
exit
code
=
1
;
fi
# generate md5 sums
# generate md5 sums
files
=
$(
ls
$mysql_distro
/build.
*
/
*
.tar.gz
)
for
f
in
$(
find
$mysql_distro
/build.
*
-maxdepth
1
\(
-name
'*.tar.gz'
-o
-name
'*.rpm'
\)
)
;
do
for
f
in
$(
ls
$mysql_distro
/build.
*
/
*
.tar.gz
)
;
do
newf
=
$(
basename
$f
)
newf
=
$(
basename
$f
)
ln
$f
$newf
ln
$f
$newf
if
[
$?
!=
0
]
;
then
exitcode
=
1
;
fi
if
[
$?
!=
0
]
;
then
exitcode
=
1
;
fi
...
...
Write
Preview
Markdown
is supported
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