Skip to content

Commit 609890a

Browse files
author
Shlomi Noach
committed
only create builddir for linux
1 parent 0454c5e commit 609890a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
RELEASE_VERSION=
66
buildpath=
7-
builddir=
87

98
function setuptree() {
109
b=$( mktemp -d $buildpath/gh-ostXXXXXX ) || return 1
@@ -19,7 +18,6 @@ function build {
1918
GOOS=$3
2019
GOARCH=$4
2120

22-
builddir=$(setuptree)
2321

2422

2523
if ! go version | egrep -q 'go(1[.]9|1[.]1[0-9])' ; then
@@ -41,6 +39,7 @@ function build {
4139

4240
if [ "$GOOS" == "linux" ] ; then
4341
echo "Creating Distro full packages"
42+
builddir=$(setuptree)
4443
cp $buildpath/$target $builddir/gh-ost/usr/bin
4544
cd $buildpath
4645
fpm -v "${RELEASE_VERSION}" --epoch 1 -f -s dir -n gh-ost -m shlomi-noach --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 .

0 commit comments

Comments
 (0)