Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore update scripts to 409508c9fc98c67f59361a28f73e0818d5e46e25 #23

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions .github/workflows/merge-template.yaml

This file was deleted.

12 changes: 6 additions & 6 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"tasks": {
"start": "deno run --allow-all --unstable ./server/server.ts",
"dev": "deno run --allow-all --unstable --watch ./server/server.ts",
"start": "deno run --allow-all --unstable-ffi ./server/server.ts",
"dev": "deno run --allow-all --unstable-ffi --watch ./server/server.ts",
"build": "deno run --allow-all ./server/bundler.ts",
"init": "deno run --allow-all --allow-run --unstable ./scripts/init.ts",
"update": "deno run --allow-all --allow-run --unstable ./storage/db/scripts/init.ts --update",
"init": "deno run --allow-all --allow-run --unstable-ffi ./scripts/init.ts",
"update": "deno run --allow-all --allow-run --unstable-ffi ./storage/db/scripts/init.ts --update",
"entry": "deno run --allow-all ./scripts/add-entry.ts prompt",
"status": "deno run --allow-all ./scripts/add-status.ts status",
"socket": "deno run --allow-all ./scripts/add-status.ts socket",
"type-route": "deno run --allow-all ./scripts/type-route.ts",
"discord": "deno run --allow-all --unstable ./server/utilities/discord/discord.ts",
"test": "deno test --allow-all --unstable --no-check ./scripts/test.ts -- --default",
"discord": "deno run --allow-all --unstable-ffi ./server/utilities/discord/discord.ts",
"test": "deno test --allow-all --unstable-ffi --no-check ./scripts/test.ts -- --default",
"view-paths": "deno run --allow-all ./scripts/view-paths.ts",
"tree": "deno run --allow-all ./scripts/dir-tree.ts"
},
Expand Down
31 changes: 22 additions & 9 deletions storage/db/scripts/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ export const setVersions = async (db: Database) => {
);
}

// console.log('current', M, m, p);
// console.log('test', _M, _m, _p);

const installedStr = 'Skipping version ' +
_M +
'.' +
Expand All @@ -113,17 +116,27 @@ export const setVersions = async (db: Database) => {
_p +
' because it is already installed';

const runLog = () => log(installedStr);

if (M > _M) {
log(installedStr);
continue;
}
if (m && m > _m) {
log(installedStr);
continue;
}
if (p && p >= _p) {
log(installedStr);
// console.log('lower major');
runLog();
continue;
} else if (M === _M) {
// console.log('same major');
if (m !== undefined && m > _m) {
// console.log('lower minor');
runLog();
continue;
} else if (m === _m) {
// console.log('same minor');
// console.log(M, m, p, _M, _m, _p);
if (p !== undefined && p >= _p) {
// console.log('same patch')
runLog();
continue;
}
}
}

log('Updating database to version', _M + '.' + _m + '.' + _p);
Expand Down
Loading