Merge branch 'sqlite-support' into develop

This commit is contained in:
Matt Baer 2018-12-10 00:27:50 -05:00
commit d3b120be75
3 changed files with 17 additions and 8 deletions

View File

@ -16,13 +16,22 @@ build: deps
cd cmd/writefreely; $(GOBUILD) -v
build-linux: deps
cd cmd/writefreely; GOOS=linux GOARCH=amd64 $(GOBUILD) -v
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GOGET) -u github.com/karalabe/xgo; \
fi
xgo --targets=linux/amd64, -dest build/ $(LDFLAGS) -out writefreely ./cmd/writefreely
build-windows: deps
cd cmd/writefreely; GOOS=windows GOARCH=amd64 $(GOBUILD) -v
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GOGET) -u github.com/karalabe/xgo; \
fi
xgo --targets=windows/amd64, -dest build/ $(LDFLAGS) -out writefreely ./cmd/writefreely
build-darwin: deps
cd cmd/writefreely; GOOS=darwin GOARCH=amd64 $(GOBUILD) -v
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GOGET) -u github.com/karalabe/xgo; \
fi
xgo --targets=darwin/amd64, -dest build/ $(LDFLAGS) -out writefreely ./cmd/writefreely
build-docker :
$(DOCKERCMD) build -t $(IMAGE_NAME):latest -t $(IMAGE_NAME):$(GITREV) .
@ -50,15 +59,15 @@ release : clean ui
cp schema.sql build
cp sqlite.sql build
$(MAKE) build-linux
cp cmd/writefreely/$(BINARY_NAME) build
mv build/$(BINARY_NAME)-linux-amd64 build/$(BINARY_NAME)
cd build; tar -cvzf ../$(BINARY_NAME)_$(GITREV)_linux_amd64.tar.gz *
rm build/$(BINARY_NAME)
$(MAKE) build-darwin
cp cmd/writefreely/$(BINARY_NAME) build
mv build/$(BINARY_NAME)-darwin-10.6-amd64 build/$(BINARY_NAME)
cd build; tar -cvzf ../$(BINARY_NAME)_$(GITREV)_darwin_amd64.tar.gz *
rm build/$(BINARY_NAME)
$(MAKE) build-windows
cp cmd/writefreely/$(BINARY_NAME).exe build
mv build/$(BINARY_NAME)-windows-4.0-amd64.exe build/$(BINARY_NAME).exe
cd build; zip -r ../$(BINARY_NAME)_$(GITREV)_windows_amd64.zip ./*
$(MAKE) build-docker
$(MAKE) release-docker

View File

@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `accesstokens` (
`one_time` tinyint(1) NOT NULL DEFAULT '0',
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`expires` datetime DEFAULT NULL,
`user_agent` varchar(255) NOT NULL,
`user_agent` varchar(255) DEFAULT NULL,
PRIMARY KEY (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS `accesstokens` (
one_time INTEGER NOT NULL DEFAULT '0',
created DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
expires DATETIME DEFAULT NULL,
user_agent TEXT NOT NULL
user_agent TEXT DEFAULT NULL
);
-- --------------------------------------------------------