Skip to content

Commit

Permalink
Explicit export
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Sep 25, 2024
1 parent 62e7614 commit b21b304
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions task/generate-labels/0.1/generate-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,14 @@ spec:
#!/bin/bash
ACTUAL_DATE_EPOCH=$(date -u +'%s')
# shellcheck disable=SC2034 # Unused variable used implicitly in envsubst
ACTUAL_DATE=$(date -u --date=@"$ACTUAL_DATE_EPOCH" +'%Y-%m-%dT%H:%M:%S')
if [ "$SOURCE_DATE_EPOCH" == "" ]; then
SOURCE_DATE_EPOCH="$ACTUAL_DATE_EPOCH"
fi
# shellcheck disable=SC2034 # Unused variable used implicitly in envsubst
SOURCE_DATE=$(date -u --date=@"$SOURCE_DATE_EPOCH" +'%Y-%m-%dT%H:%M:%S')
# Export, so that these are available to the subshell below
export ACTUAL_DATE
export ACTUAL_DATE_EPOCH
export SOURCE_DATE
Expand Down

0 comments on commit b21b304

Please sign in to comment.