Skip to content

Commit

Permalink
ci: improve .gitpod.yml (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
axonasif committed Nov 6, 2023
1 parent c06c711 commit 810727a
Showing 1 changed file with 8 additions and 12 deletions.
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

0 comments on commit 810727a

Please sign in to comment.