Skip to content

Commit

Permalink
Revert "Fix rapids-date-string (#68)" (#70)
Browse files Browse the repository at this point in the history
This reverts commit #68, which unintentionally broke some things in CI.
  • Loading branch information
ajschmidt8 authored Aug 1, 2023
1 parent 11b34df commit 47ca61c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
20 changes: 2 additions & 18 deletions tools/rapids-date-string
Original file line number Diff line number Diff line change
@@ -1,25 +1,9 @@
#!/bin/bash
# A utility script produces a date string

# TODO: remove default value after calling scripts are updated
FORMAT_ARG="${1:-second}"

case "${FORMAT_ARG}" in
day)
FORMAT="%y%m%d"
;;
second)
FORMAT="%s"
;;
*)
rapids-echo-stderr "Invalid format argument: ${FORMAT_ARG}"
exit 1
;;
esac

RAPIDS_DATE_STRING="$(date +${FORMAT})"
RAPIDS_DATE_STRING="$(date +%y%m%d)"
if [ "${GITHUB_ACTIONS:-false}" = "true" ]; then
WORKFLOW_DATE=$(rapids-retry gh run view "${GITHUB_RUN_ID}" --json createdAt | jq -r '.createdAt')
RAPIDS_DATE_STRING=$(date -d "${WORKFLOW_DATE}" +${FORMAT})
RAPIDS_DATE_STRING=$(date -d "${WORKFLOW_DATE}" +%y%m%d)
fi
export RAPIDS_DATE_STRING
2 changes: 1 addition & 1 deletion tools/rapids-env-update
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ rapids-configure-conda-channels

source rapids-configure-sccache

source rapids-date-string day
source rapids-date-string

0 comments on commit 47ca61c

Please sign in to comment.