mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-29 23:49:25 +01:00
Merge pull request #257 from slingamn/issue253
have travis enforce gofmt, #253
This commit is contained in:
commit
78c0825e2a
10
.travis.gofmt.sh
Normal file
10
.travis.gofmt.sh
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# exclude vendor/
|
||||||
|
SOURCES="./oragono.go ./irc"
|
||||||
|
|
||||||
|
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
||||||
|
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
||||||
|
gofmt -s -d $SOURCES
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -7,3 +7,4 @@ script:
|
|||||||
- tar -xzf goreleaser_Linux_x86_64.tar.gz -C $GOPATH/bin
|
- tar -xzf goreleaser_Linux_x86_64.tar.gz -C $GOPATH/bin
|
||||||
- make
|
- make
|
||||||
- make test
|
- make test
|
||||||
|
- bash ./.travis.gofmt.sh
|
||||||
|
@ -282,12 +282,12 @@ func schemaChangeV2ToV3(config *Config, tx *buntdb.Tx) error {
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
allChanges := []SchemaChange{
|
allChanges := []SchemaChange{
|
||||||
SchemaChange{
|
{
|
||||||
InitialVersion: "1",
|
InitialVersion: "1",
|
||||||
TargetVersion: "2",
|
TargetVersion: "2",
|
||||||
Changer: schemaChangeV1toV2,
|
Changer: schemaChangeV1toV2,
|
||||||
},
|
},
|
||||||
SchemaChange{
|
{
|
||||||
InitialVersion: "2",
|
InitialVersion: "2",
|
||||||
TargetVersion: "3",
|
TargetVersion: "3",
|
||||||
Changer: schemaChangeV2ToV3,
|
Changer: schemaChangeV2ToV3,
|
||||||
|
Loading…
Reference in New Issue
Block a user