Skip to content

Commit

Permalink
chore: add godo
Browse files Browse the repository at this point in the history
  • Loading branch information
bastean committed Sep 16, 2024
1 parent bc731a7 commit e1c9297
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 58 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ upgrade-reset:
${npm-ci}

upgrade:
go run ./scripts/upgrade
godo exec -c configs/upgrade.json

#*______Install______

Expand All @@ -73,6 +73,7 @@ install-linters:
npm i -g prettier

install-tools-dev: install-scanners install-linters
go install github.com/bastean/godo/cmd/godo@latest
go install github.com/air-verse/air@latest
go install github.com/a-h/templ/cmd/templ@latest

Expand Down Expand Up @@ -294,7 +295,7 @@ devcontainer:
${bash} 'echo -e "$(USER_PASSWORD)\n$(USER_PASSWORD)" | sudo passwd vscode'

connect:
ssh -p 2222 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null vscode@localhost
ssh -p $(PORT) -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o GlobalKnownHostsFile=/dev/null vscode@localhost

#*______Fix______

Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,6 @@ make demo
- Synchronize all **.env\*** files in the directory using an **.env** model.
- [copydeps](scripts/copydeps/copydeps.go)
- Copies the files required by the browser dependencies from the **node_modules** folder and places them inside the **static** folder on the server.
- [upgrade](scripts/upgrade/upgrade.go)
- Perform the following steps to upgrade the project:
- Upgrade Go, Node and Tools.
- Linting and Testing.
- Commit upgrades.
- [run](deployments/run.sh)
- Display the logs and redirect them to a file whose name depends on the time at which the service was run.
- Used in Production Image.
Expand Down
41 changes: 41 additions & 0 deletions configs/upgrade.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"Tasks": [
{
"Success": "Starting upgrades..."
},
{
"Title": "Linting...",
"Commands": [{ "Name": "make", "Args": ["lint"] }]
},
{
"Title": "Upgrading Go",
"Commands": [{ "Name": "make", "Args": ["upgrade-go"] }]
},
{
"Title": "Upgrading Node",
"Commands": [{ "Name": "make", "Args": ["upgrade-node"] }]
},
{
"Title": "Upgrading Tooling",
"Commands": [{ "Name": "make", "Args": ["install-tooling"] }]
},
{
"Title": "Linting...",
"Commands": [{ "Name": "make", "Args": ["lint"] }]
},
{
"Title": "Testing...",
"Commands": [{ "Name": "make", "Args": ["test-unit"] }]
},
{
"Title": "Committing upgrades",
"Commands": [
{ "Name": "git", "Args": ["add", ".", "--update"] },
{ "Name": "git", "Args": ["commit", "-m", "chore(deps): upgrade"] }
]
},
{
"Success": "Upgrade completed!"
}
]
}
51 changes: 0 additions & 51 deletions scripts/upgrade/upgrade.go

This file was deleted.

0 comments on commit e1c9297

Please sign in to comment.