<Qboid>
[#27] title: Move extra scripts to command-line arguments | If we actually end up restructuring our package, it might be good to retire the `tools/` directory and move the `migrate` and `setup` scripts to our main package. So, instead of calling them separately, they would be arguments passed to the main package.... | https://github.com/KSP-SpaceDock/SpaceDock-Backend/issues/27
<RockyTV>
I'm already workign on it, just need your approval. I was thinking we'd need to move app.init() to a function and call it if we want to run the app
<Thomas>
We should do that, yeah
<Qboid>
Starting build #51 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #42 3 mo 1 day ago)
<Thomas>
the windows version was successfull, but the second build had an error with build_sdb.go
<RockyTV>
so what is the fix for the command-line argument change?
<RockyTV>
also, what was wrong with build_sdb.go?
<SpaceDock>
[SpaceDock-Backend] StollD pushed 1 new commit to master: https://git.io/v7lDY
<SpaceDock>
SpaceDock-Backend/master 16c0b43 Dorian Stoll: the other version seems to duplicate the file somehow
<Qboid>
Starting build #59 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #42 3 mo 1 day ago)
<Thomas>
i think it contained sdb.go twice because the build script failed at deleting it
<Thomas>
RockyTV: Tbh, I would keep everything in init, and just dont run the webserver if it isn't required. Even if the stuff we run (migration script) doesnt even use things like the database or the settings
<Qboid>
dorian: the other version seems to duplicate the file somehow
<Thomas>
20:57:05 ERROR: No artifacts found that match the file pattern "sdb-*.zip". Configuration error?
<Thomas>
20:57:05 ERROR: ‘sdb-*.zip’ doesn’t match anything, but ‘src/github.com/KSP-SpaceDock/SpaceDock-Backend/sdb-*.zip’ does. Perhaps that’s what you mean?
<Thomas>
I hate it xD
<RockyTV>
Thomas, okay then
<Qboid>
Starting build #60 for job SpaceDock-Backend (previous build: STILL FAILING -- last SUCCESS #42 3 mo 1 day ago)
<RockyTV>
should I delete tools/ and move the contents to sdb.go or just import tools/?
<Thomas>
Yippie
<Thomas>
Import it
<Thomas>
both files are rather large
<Thomas>
and give that sdb.go gets processed on every build..
<Thomas>
*given
<RockyTV>
sdb.go:16:5: import "github.com/KSP-SpaceDock/SpaceDock-Backend/tools" is a program, not an importable package
<RockyTV>
damn it
<RockyTV>
fixed it
<Thomas>
Lol, jenkins has a button that displays zip files as plaintext
<RockyTV>
is it normal for the setup script to take a while to load
<RockyTV>
s/load/finish
<Qboid>
RockyTV meant to say: is it normal for the setup script to take a while to finish
<Thomas>
Yes
<Thomas>
Unless the app is set to debug mode it wont log
<Thomas>
if it is set to debug mode it will log the heck out of your terminal :P
<RockyTV>
uh question
<RockyTV>
regarding the control codes: is it supposed to set my background color to blue?
<RockyTV>
idk why but running sdb.exe evreytime will just update my database
<RockyTV>
is it expected behavior
<RockyTV>
?
<Thomas>
I am not sure what you mean
<Thomas>
re control codes: could be
<RockyTV>
everytime I run sdb.exe my terminal is spammed with "[2017-07-30 16:15:59] [2.63ms] INSERT INTO "role_abilities" ("ability_id","role_id") SELECT '16','2' WHERE NOT EXISTS (SELECT * FROM "role_abilities" WHERE "ability_id" = '16' AND "role_id" = '2')"
<Thomas>
Ah, yeah. The abilities are defined in the routes, and it tries to create them when sdb starts
<RockyTV>
can't you just check if they exist before trying to create them?
<Thomas>
It does that
<Thomas>
I think
<Thomas>
Ah, I use FirstOrInit
<Thomas>
That means "create if it doesnt exist"
<RockyTV>
it generated a 40mb log file
<Thomas>
and checking manually would spam even more
<RockyTV>
hm,. the color codes might be messed up
<Thomas>
Which terminal do you use?
<RockyTV>
powershell
<Thomas>
Hmm, works fine in powershell for me
<RockyTV>
do you use colorhost?
<Thomas>
what?
<Thomas>
I use powershell
<RockyTV>
my prompt sets the background color to black, though