mirror of
https://github.com/huhu/rust-search-extension
synced 2024-11-14 23:57:07 +00:00
Download crates.io dumped database before build crates index
This commit is contained in:
parent
ba523999d5
commit
a872c12762
2 changed files with 5 additions and 1 deletions
3
.github/workflows/crates-index.yml
vendored
3
.github/workflows/crates-index.yml
vendored
|
@ -13,5 +13,8 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
||||
- name: Download crates.io dumped database
|
||||
- run: |
|
||||
wget -v https://static.crates.io/db-dump.tar.gz -O /data/db-dump.tar.gz
|
||||
- name: Deloy crates index
|
||||
run: ./scripts/deploy-crates-index.sh
|
||||
|
|
|
@ -2,12 +2,13 @@
|
|||
set -e
|
||||
|
||||
CRATES_INDEX_PATH="/tmp/index.js"
|
||||
CRATES_DATABASE_PATH="/data/db-dump.tar.gz"
|
||||
BRANCH="now"
|
||||
|
||||
build() {
|
||||
echo "Starting building crates-index..."
|
||||
cd rust
|
||||
RUST_BACKTRACE=full cargo run --release --bin crates-index ${CRATES_INDEX_PATH}
|
||||
RUST_BACKTRACE=full cargo run --release --bin crates-index ${CRATES_DATABASE_PATH} ${CRATES_INDEX_PATH}
|
||||
echo "{\"version\": $(date +%s)}" > /tmp/version.json
|
||||
cd ..
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue