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

ci: improve .gitpod.yml #57

Merged
merged 1 commit into from
Nov 6, 2023
Merged
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
20 changes: 8 additions & 12 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ tasks:

# workaround for https://github.com/gitpod-io/gitpod/issues/524
find target -exec stat --format='%.Y %n' {} + > /workspace/.ts

command: |
# workaround for https://github.com/gitpod-io/gitpod/issues/524
while read -r ts file; do touch -d "@${ts}" "${file}"; done < /workspace/.ts

- name: Setup BotConfig and run program
before: |
# Fully cleanup terminal
printf "\033[3J\033c\033[3J"

Expand All @@ -21,16 +22,11 @@ tasks:
base64 -d <<<"${PROD_DISCORD_BOT_CONFIG_ENCODED}" > ProdBotConfig.toml
} fi

# Await for meilisearch to be fully up
#printf '\n\ninfo: %s\n' "Awaiting for meilisearch to be fully up ..."
#until curl --silent --show-error --fail http://localhost:7700/health >/dev/null 2>&1; do sleep 0.5; done

# Restore config if exists and run bot
config_name="BotConfig.toml"

if test -n "${DISCORD_BOT_CONFIG_ENCODED:-}"; then {
base64 -d <<< "${DISCORD_BOT_CONFIG_ENCODED}" > "${config_name}"
cargo run -- "${config_name}"
} else {
# Create "BotConfig.toml"
cp ExampleBotConfig.toml "${config_name}"
Expand All @@ -49,13 +45,13 @@ tasks:
"# To execute the bot from cargo in debug variant" \
" ${YELLOW}cargo run -- ${config_name}${RC}"
} fi
command: |
config_name="BotConfig.toml"

if test -e "${config_name}"; then {
cargo run -- "${config_name}"
} fi

# - name: Meilisearch
# command: |
# # Fully cleanup terminal
# printf "\033[3J\033c\033[3J"
# # Start server
# meilisearch --no-analytics --master-key "${MEILISEARCH_API_KEY}" --env development --http-addr 0.0.0.0:7700 --db-path ./data.ms
vscode:
extensions:
- https://github.com/rust-lang/rust-analyzer/releases/download/2023-10-09/rust-analyzer-linux-x64.vsix
Expand Down
Loading