-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add tools to cross-compile the Docker image and deploy on a Ras…
…pberry Pi (#51)
- Loading branch information
Showing
28 changed files
with
1,015 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
.git | ||
target/* | ||
.cargo | ||
ADRs | ||
.vscode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "scripts/bash-toolbox"] | ||
path = scripts/bash-toolbox | ||
url = https://github.com/RemiBardon/bash-toolbox.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# See <https://taskfile.dev/usage> and <https://taskfile.dev/reference/schema> | ||
# to find all keys and their usage. | ||
version: "3" | ||
|
||
tasks: | ||
open-api-docs-ui: | ||
desc: Runs the Prose Pod API and opens the visual API documentation. | ||
cmds: | ||
- ./scripts/open-api-docs-ui | ||
reset-db: | ||
desc: Backs up the database and resets it using `sea-orm-cli`. | ||
cmds: | ||
- ./scripts/reset-db | ||
entity: | ||
desc: Generates database entities using `sea-orm-cli`. | ||
deps: [reset-db] | ||
cmds: | ||
- sea-orm-cli generate entity -o entity/src --lib \ | ||
--tables "$(TABLES)" \ | ||
--with-serde both \ | ||
--serde-skip-deserializing-primary-key \ | ||
--serde-skip-hidden-column | ||
# --model-extra-derives 'rocket::form::FromForm' | ||
format-all: | ||
desc: Formats all Rust files. | ||
cmds: | ||
- cargo fmt | ||
format: | ||
desc: Formats modified Rust files. | ||
cmds: | ||
- ./.githooks/pre-commit | ||
test: | ||
desc: Runs all tests and updates "Tested at Rust version" in the `README`. | ||
deps: [smoke-test, integration-test] | ||
cmds: | ||
# NOTE: This is macOS `sed`, out of simplicity since all maintainers use macOS | ||
- 'sed -i '''' ''s/Tested at Rust version: `.+`/Tested at Rust version: `''"$(rustc --version)"''`/g'' README.md' | ||
smoke-test: | ||
desc: Runs smoke tests. | ||
cmds: | ||
- cargo test --test behavior -- {{.CLI_ARGS}} | ||
integration-test: | ||
desc: Runs integration tests. | ||
cmds: | ||
# NOTE: Analytics are temporarily disabled because of [stepci/stepci#239](https://github.com/stepci/stepci/issues/239). | ||
- STEPCI_DISABLE_ANALYTICS=true ./scripts/integration-test {{.CLI_ARGS}} | ||
update: | ||
desc: Updates all dependencies. | ||
deps: [update-redoc] | ||
cmds: | ||
# NOTE: `cargo update` updates all workspace member crates | ||
- echo '[INFO] Updating Rust dependencies…' | ||
- rustup upgrade | ||
- cargo update | ||
# Check for outdated dependencies | ||
- "if cargo install --list | grep -q '^cargo-edit v'; then \ | ||
echo '[INFO] Checking for outdated dependencies…'; \ | ||
cargo upgrade --dry-run --incompatible --pinned --verbose; \ | ||
else \ | ||
echo '[WARN] Install `cargo upgrade` with `cargo install cargo-edit` for this script to check for outdated dependencies'; \ | ||
fi" | ||
update-redoc: | ||
desc: Updates Redoc. | ||
cmds: | ||
- echo '[INFO] Updating Redoc…' | ||
- wget -q https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js -O static/api-docs/redoc.standalone.js | ||
build-image: | ||
desc: Builds the Prose Pod API Docker image. Run `task build-image -- --help` for more info. | ||
env: | ||
SCRIPTS_ROOT: "{{.ROOT_DIR}}/scripts" | ||
cmds: | ||
- "{{.ROOT_DIR}}/scripts/build-image {{.CLI_ARGS}}" |
Submodule bash-toolbox
added at
77c9de
Oops, something went wrong.