plugins = [ 'v' ] task::fetch-build-info = { description = 'Fetch misc build information, mainly for the about page' run = 'v scripts/fetchbuildinfo.vsh' } // Database task:db.init = { description = 'Initialize and start a local Postgres database via Docker' category = 'db' run = 'docker run -it \ --name beep-database \ -e POSTGRES_DB=beep \ -e POSTGRES_USER=beep \ -e POSTGRES_PASSWORD=beep \ --mount source=beep-data,target=/var/lib/postgresql/data \ -p 127.0.0.1:5432:5432 \ postgres:17' } task:db.start = { description = 'Start the docker image for the local database' category = 'db' run = 'docker start beep-database' } task:db.stop = { description = 'Stop the docker image for the local database' category = 'db' run = 'docker stop beep-database' } task:db.login = { description = 'Log into and modify the local database' category = 'db' run = 'docker exec -it beep-database psql -h localhost -p 5432 -d beep -U beep -W' } task:db.shell = { description = 'Open a shell in the local database' category = 'db' run = 'docker exec -it beep-database sh' } task:db.dangerous.nuke = { description = 'Delete the docker image AND ITS DATA. This will delete **EVERYTHING** in the database.' category = 'db' run = 'docker rm beep-database && docker volume rm beep-data' } // Ngrok task:ngrok = { description = 'Open an ngrok tunnel for testing.' category = 'misc' run = 'ngrok http http://localhost:8008' } task:ngrok.url = { description = 'Open an ngrok tunnel for testing. Requires you to pass the ngrok URL as an argument.' category = 'misc' run = 'ngrok http --url=${args} http://localhost:8008' } // Run task:run = { description = 'Run beep' category = 'run' depends = [':fetch-build-info'] run = '${v} run ${v_main} config.maple' } task:run.real = { description = 'Run beep using config.real.maple' category = 'run' depends = [':fetch-build-info'] run = '${v} run ${v_main}' } task:run.watch = { description = 'Watch/run beep' category = 'run' depends = [':fetch-build-info'] run = '${v} -d veb_livereload watch run ${v_main} config.maple' } task:run.watch.real = { description = 'Watch/run beep using config.real.maple' category = 'run' depends = [':fetch-build-info'] run = '${v} watch run ${v_main}' } // Misc task:cloc = { description = 'Get the lines of code for beep!' category = 'misc' //todo: contribute vlang support to cloc and use that here instead of it seeing all of our v code as verilog code run = 'cloc ./src/' }