Bumped the requirements upto Go 1.10

Added the Linux version of dev-update.
The patcher should compile now.
This commit is contained in:
Azareal 2018-04-07 06:27:25 +01:00
parent a6893c0dfe
commit 55a0c31bc3
5 changed files with 57 additions and 4 deletions

View File

@ -1,6 +1,5 @@
language: go
go:
- 1.9
- 1.10
- master
before_install:

View File

@ -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.

46
dev-update-linux Normal file
View File

@ -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

View File

@ -108,5 +108,6 @@ if %errorlevel% neq 0 (
)
echo Patching Gosora
go generate
go build ./patcher
patcher.exe

View File

@ -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
}