Skip to content

Commit 6121270

Browse files
authored
Fix sitemap generate and upload script (#2310)
The CWD is not in the same directory as the script. Use the script from the global PATH.
1 parent 597e1fa commit 6121270

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docker/cron/generate_sitemap/generate_and_upload.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
set -e
44

5+
SCRIPT_PATH=$(dirname "$(readlink -f "$0")")
6+
57
SITEMAP_OUTPUT="sitemap_output/"
68
OUTPUT_BUCKET="${OUTPUT_GCS_BUCKET:=test-osv-dev-sitemap}"
79
BASE_URL_PATH="${BASE_URL:=https://test.osv.dev}"
810

911
echo "Begin sitemap generation for $BASE_URL_PATH"
1012

11-
./generate_sitemap.py --base_url $BASE_URL_PATH
13+
"$SCRIPT_PATH/generate_sitemap.py" --base_url $BASE_URL_PATH
1214

1315
echo "Begin Syncing with cloud to $OUTPUT_BUCKET"
1416

0 commit comments

Comments
 (0)