Skip to content

Commit

Permalink
Use incremental dbversion
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Sep 24, 2024
1 parent 4c9a193 commit a6b99b2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docinit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ fi
repo_owner=${INFERENCE_RESULTS_REPO_OWNER:-mlcommons}
repo_branch=${INFERENCE_RESULTS_REPO_BRANCH:-main}
repo_name=${INFERENCE_RESULTS_REPO_NAME:-inference_results_${INFERENCE_RESULTS_VERSION}}

ver_num=$(cat dbversion)
let ver_num++
echo "ver_num=$ver_num" > dbversion
if [ ! -e docs/javascripts/config.js ]; then
if [ -n "${INFERENCE_RESULTS_VERSION}" ]; then
echo "const results_version=\"${INFERENCE_RESULTS_VERSION}\";" > docs/javascripts/config.js;
echo "var repo_owner=\"${repo_owner}\";" >> docs/javascripts/config.js;
echo "var repo_branch=\"${repo_branch}\";" >> docs/javascripts/config.js;
echo "var repo_name=\"${repo_name}\";" >> docs/javascripts/config.js;
ver_num=`echo ${INFERENCE_RESULTS_VERSION} | tr -cd '0-9'`
#ver_num=`echo ${INFERENCE_RESULTS_VERSION} | tr -cd '0-9'`
echo "const dbVersion =\"${ver_num}\";" >> docs/javascripts/config.js;
else
echo "Please export INFERENCE_RESULTS_VERSION=v4.1 or the corresponding version";
Expand Down

0 comments on commit a6b99b2

Please sign in to comment.