-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
1 parent
11b34df
commit 47ca61c
Showing
2 changed files
with
3 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters