Skip to content

Commit 619d9d3

Browse files
author
dm-2
authored
Merge branch 'master' into documentation-update
2 parents 66fadc7 + 39bba9c commit 619d9d3

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

build.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function build {
1818
GOOS=$3
1919
GOARCH=$4
2020

21-
if ! go version | egrep -q 'go(1\.1[56])' ; then
21+
if ! go version | egrep -q 'go1\.(1[5-9]|[2-9][0-9]{1})' ; then
2222
echo "go version must be 1.15 or above"
2323
exit 1
2424
fi
@@ -40,8 +40,9 @@ function build {
4040
builddir=$(setuptree)
4141
cp $buildpath/$target $builddir/gh-ost/usr/bin
4242
cd $buildpath
43-
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'shlomi-noach <[email protected]>' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t rpm --rpm-rpmbuild-define "_build_id_links none" .
44-
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'shlomi-noach <[email protected]>' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t deb --deb-no-default-config-files .
43+
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'GitHub' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t rpm --rpm-rpmbuild-define "_build_id_links none" .
44+
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m 'GitHub' --description "GitHub's Online Schema Migrations for MySQL " --url "https://github.com/github/gh-ost" --vendor "GitHub" --license "Apache 2.0" -C $builddir/gh-ost --prefix=/ -t deb --deb-no-default-config-files .
45+
cd -
4546
fi
4647
}
4748

@@ -62,10 +63,13 @@ main() {
6263
mkdir -p ${buildpath}
6364
rm -rf ${buildpath:?}/*
6465
build GNU/Linux linux linux amd64
65-
# build macOS osx darwin amd64
66+
build macOS osx darwin amd64
6667

6768
echo "Binaries found in:"
6869
find $buildpath/gh-ost* -type f -maxdepth 1
70+
71+
echo "Checksums:"
72+
(cd $buildpath && shasum -a256 gh-ost* 2>/dev/null)
6973
}
7074

7175
main "$@"

go/cmd/gh-ost/main.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ package main
88
import (
99
"flag"
1010
"fmt"
11+
"net/url"
1112
"os"
1213
"os/signal"
1314
"syscall"
@@ -188,6 +189,11 @@ func main() {
188189
log.Fatalf("--database must be provided and database name must not be empty, or --alter must specify database name")
189190
}
190191
}
192+
193+
if err := flag.Set("database", url.QueryEscape(migrationContext.DatabaseName)); err != nil {
194+
migrationContext.Log.Fatale(err)
195+
}
196+
191197
if migrationContext.OriginalTableName == "" {
192198
if parser.HasExplicitTable() {
193199
migrationContext.OriginalTableName = parser.GetExplicitTable()

0 commit comments

Comments
 (0)