diff --git a/.travis.yml b/.travis.yml index 043ebf0a..36c5ac90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: go go: - - 1.9 - 1.10 - master before_install: diff --git a/README.md b/README.md index ad490301..d66a3de7 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,11 @@ It's entirely possible that your host might already have MySQL, so you might be At some point, we'll have releases which you can download, but right now, you'll have to use the `git clone` command as mentioned down in the advanced setup section to download a copy of Gosora. +# Updating + +The update system is currently under development, however if you have Git installed, then you can run `dev-update.bat` or `dev-update-linux` to update your instance to the latest commit and to update the associated database schema, etc. + + # Installation Instructions *Linux* @@ -183,7 +188,7 @@ More images in the /images/ folder. Beware though, some of them are *really* out # Dependencies (a few of these like Rez aren't currently in use, but we anticipate that we'll need some sort of search engine library in the very immediate future) -* Go 1.9 +* Go 1.10+ * MariaDB (or any other MySQL compatible database engine). We'll allow other database engines in the future. diff --git a/dev-update-linux b/dev-update-linux new file mode 100644 index 00000000..fddfb172 --- /dev/null +++ b/dev-update-linux @@ -0,0 +1,46 @@ +echo "Updating the MySQL Driver" +go get -u github.com/go-sql-driver/mysql + +echo "Updating the PostgreSQL Driver" +go get -u github.com/lib/pq + +echo "Updating the MSSQL Driver" +go get -u github.com/denisenkom/go-mssqldb + +echo "Updating bcrypt" +go get -u golang.org/x/crypto/bcrypt + +echo "Updating gopsutil" +go get -u github.com/Azareal/gopsutil + +echo "Updating Gorilla WebSockets" +go get -u github.com/gorilla/websocket + +echo "Updating Sourcemap (dependency for OttoJS)" +go get -u gopkg.in/sourcemap.v1 + +echo "Updating OttoJS" +go get -u github.com/robertkrimen/otto + +echo "Updating the Rez Image Resizer" +go get -u github.com/bamiaux/rez + +echo "Updating fsnotify" +go get -u github.com/fsnotify/fsnotify + +echo "Updating Go Git" +go get -u gopkg.in/src-d/go-git.v4/... + +echo "Updating GopherJS" +go get -u github.com/gopherjs/gopherjs + +echo "Updating Gosora" +git pull origin master + +echo "Patching Gosora" +cd ./patcher +go generate +go build -o Patcher +mv ./Patcher .. +cd .. +./Patcher \ No newline at end of file diff --git a/dev-update.bat b/dev-update.bat index dbc31dc0..b61969bb 100644 --- a/dev-update.bat +++ b/dev-update.bat @@ -108,5 +108,6 @@ if %errorlevel% neq 0 ( ) echo Patching Gosora +go generate go build ./patcher patcher.exe \ No newline at end of file diff --git a/patcher/main.go b/patcher/main.go index 91ade485..5400e677 100644 --- a/patcher/main.go +++ b/patcher/main.go @@ -61,8 +61,10 @@ func patcher(scanner *bufio.Scanner) error { } }*/ -func eachUser(handle func(int)) error { - stmt, err := qgen.Builder.Select("users").Prepare() +func eachUser(handle func(int) error) error { + acc := qgen.Builder.Accumulator() + stmt := acc.Select("users").Prepare() + err := acc.FirstError() if err != nil { return err }