Refactor build steps

This commit is contained in:
Anthony Mineo 2020-03-07 11:01:21 -05:00
parent d17efed959
commit 964b024b02
7 changed files with 57 additions and 21 deletions

View file

@ -11,10 +11,6 @@ Parser for DarkTiger's T2 Server Stats
package main
import (
_ "github.com/amineo/t2-stat-parser"
)
func main() {
init()
initParser()
}

View file

@ -9,7 +9,7 @@ Parser for DarkTiger's T2 Server Stats
- Ability to download stat files from remote server via FTP
*/
package parser
package main
import (
"bufio"
@ -69,7 +69,7 @@ type Game struct {
uuid string `db.games:"uuid"`
}
func init() {
func initParser() {
start := time.Now()
flag.Parse()
var err error

15
app/t2-stats/start.sh Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
echo "starting..";
echo "Checking if build exists.."
if [ -f /app/main ]
then
echo "Build found!"
/app/main
else
echo "No build found, running from source"
go run *.go
fi