Compare commits

...

6 Commits

Author SHA1 Message Date
Jess Breckenridge
759e8af34b - Adding env to build file 2017-05-02 15:34:03 -06:00
Jess Breckenridge
d609d89f78 - Getting started with gh-ost documentation. 2017-05-02 14:57:26 -06:00
Jess Breckenridge
03e8d65938 - Oops. Moved incorrectly. 2017-05-02 14:47:26 -06:00
Jess Breckenridge
175b6037d9 - Modifications so that development is easier.
- Striving for clone && boostrap and test simplicity.
- Modifications strive to use go 1.7 in repo directory.
- Moved libs to src directory where go expects them.
2017-05-02 14:41:15 -06:00
Jess Breckenridge
aa2999bd96 - Redo 2017-05-02 14:27:42 -06:00
Jess Breckenridge
da7fdfc8b3 - Starting over. Did not publish before deleting to test. 2017-05-02 14:22:06 -06:00
430 changed files with 27 additions and 6 deletions

View File

@ -0,0 +1,12 @@
## Getting started with gh-ost development.
Getting started with gh-ost development is simple!
- First clone the repository.
- From inside the repository directory, run ./script/bootstrap.
- From inside the repository directory, run ./test.sh to run the tests and validate your environment.
A couple of notes here:
- Any scripts you use for development should include `. ./scripts/env.sh` at the top. All environment variables, `$GOPATH`, `$GOROOT`, etc are set here so that all scripts can use them.
- `$GOCMD` is set to use `go 1.7` installed inside the repository. This is done so that all development is using the same version of go for easy troubleshooting.

View File

@ -1,7 +1,5 @@
#!/bin/bash
set -e
# Make sure we have the version of Go we want to depend on, either from the
# system or one we grab ourselves.
. script/ensure-go-installed
@ -13,4 +11,5 @@ set -x
rm -rf .gopath
mkdir -p .gopath/src/github.com/github
ln -s "$PWD" .gopath/src/github.com/github/gh-ost
export GOPATH=$PWD/.gopath:$GOPATH
. ./script/env

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
. script/env
. script/bootstrap
mkdir -p bin
@ -13,7 +13,6 @@ scriptdir="$PWD"/script
version=$(git rev-parse HEAD)
describe=$(git describe --tags --always --dirty)
export GOPATH="$PWD/.gopath"
cd .gopath/src/github.com/github/gh-ost
# We put the binaries directly into the bindir, because we have no need for shim wrappers

9
script/env Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
## Set all environmental variables here.
export ROOTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
export GOPATH=$ROOTDIR/.gopath
export GOPATH=$GOPATH:$ROOTDIR/vendor/:$ROOTDIR/.vendor/go17/usr/local/go/
export GOROOT=$ROOTDIR/.vendor/go17/usr/local/go/
export GOCMD=$ROOTDIR/.vendor/go17/usr/local/go/bin/go

View File

@ -1,11 +1,13 @@
#!/bin/bash
. ./script/env
retval=0
for testsuite in base mysql sql
do
pushd go/${testsuite} > /dev/null;
go test $*;
$GOCMD test $*;
[ $? -ne 0 ] && retval=1
popd > /dev/null;
done

Some files were not shown because too many files have changed in this diff Show More