Skip to content

Commit

Permalink
Merge pull request #5444 from StachuDotNet/more-misc-tidyings
Browse files Browse the repository at this point in the history
misc. tidyings
  • Loading branch information
StachuDotNet authored Jan 10, 2025
2 parents cb8fabb + a405001 commit 970cd04
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 30 deletions.
46 changes: 16 additions & 30 deletions scripts/deployment/replace-prod-packages
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -euo pipefail


# This is run manually, step by step, to replace the canvas and data at packages.darklang.com.
# This is run to replace the canvas and data at packages.darklang.com.
#
# First,
# - open a terminal, and make sure you're in the devcontainer
Expand Down Expand Up @@ -63,36 +63,22 @@ run_local_exec() {
}


# handle command line args
case $1 in
1)
echo "1. Prove we can connect to the DB"
exec_sql "select 2 ;"
#exec_sql "select count(1) from user_data_v0;"
;;
echo "1. Prove we can connect to the DB"
exec_sql "select 2 ;"

2)
echo "2. Run migrations"
run_prod_exec migrations run
run_prod_exec migrations list
;;
echo "2. Run migrations"
run_prod_exec migrations run
run_prod_exec migrations list

3)
echo "3. Load packages into internal SQL tables"
# this will be used by BwdServer when _it_ needs to use package items
# , as we have a bit of a recursive dog-fooding problem.
run_local_exec load-packages-to-internal-sql-tables
;;
echo "3. Load packages into internal SQL tables"
# this will be used by BwdServer when _it_ needs to use package items
# , as we have a bit of a recursive dog-fooding problem.
run_local_exec load-packages-to-internal-sql-tables

4)
echo "4. Parse, create, and fill in dark-packages canvas"
run_local_exec reload-dark-packages
;;
echo "4. Parse, create, and fill in dark-packages canvas"
run_local_exec reload-dark-packages

5)
echo "5. Connect dark-packages canvas to packages.darklang.com domain"
canvasID='11111111-1111-1111-1111-111111111112'
domain='packages.darklang.com'
exec_sql "INSERT INTO domains_v0 (canvas_id, domain) VALUES ('$canvasID'::uuid, '$domain')"
;;
esac
echo "5. Connect dark-packages canvas to packages.darklang.com domain"
canvasID='11111111-1111-1111-1111-111111111112'
domain='packages.darklang.com'
exec_sql "INSERT INTO domains_v0 (canvas_id, domain) VALUES ('$canvasID'::uuid, '$domain')"
2 changes: 2 additions & 0 deletions scripts/devcontainer/_vscode-post-start-command
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ echo "Starting build server"

mkdir -p rundir/logs/

git config --global --add safe.directory /home/dark/app

nohup ./scripts/build/_build-server --compile --watch &> /home/dark/app/rundir/logs/build-server.log &

# It seems that if we don't sleep here, the server does not start properly in all cases
Expand Down
7 changes: 7 additions & 0 deletions vscode-extension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
This is a work-in-progress, not yet ready for general consumption.

Join [our Discord](https://darklang.com/discord-invite) to learn more.

## Running it

- (run whole repo in devcontainer -- see root README)
- `cd` to this dir
- `npm i`
- hit F5

0 comments on commit 970cd04

Please sign in to comment.