diff options
author | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-12-11 14:01:23 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <zn@mbf.nifty.com> | 2019-12-11 14:03:30 +0900 |
commit | 7fa821a80d60992f019c98ac813e2fc6e9775031 (patch) | |
tree | bbee1a709d32da8b6776a61f87a100de6bd66be3 /tool | |
parent | 6025783a3b0b37517728c635250669449bb21a53 (diff) | |
download | ruby-7fa821a80d60992f019c98ac813e2fc6e9775031.tar.gz |
Try to use `set-output`
because commit info are not necessary in env.
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/actions-commit-info.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tool/actions-commit-info.sh b/tool/actions-commit-info.sh index c44f7d43f3..56f857c1d9 100755 --- a/tool/actions-commit-info.sh +++ b/tool/actions-commit-info.sh @@ -1,17 +1,17 @@ #!/bin/bash set -euo pipefail cd $(dirname "$0")/.. -set_env () { +set_output () { echo "$1=$2" - echo "::set-env name=$1::$2" + echo "::set-output name=$1::$2" } COMMIT_TIMESTAMP="$(git log -1 --format=%ct)" -set_env "COMMIT_TIMESTAMP" "$COMMIT_TIMESTAMP" +set_output "COMMIT_TIMESTAMP" "$COMMIT_TIMESTAMP" LOGS=$(TZ=UTC git log --since='0:00' --date=iso-local --format='%cd %s') echo "commits of today:" echo "$LOGS" COUNT=$(echo "$LOGS" | wc -l) # strip spaces COUNT=$((0 + COUNT)) -set_env "COMMIT_NUMBER_OF_DAY" "$COUNT" -set_env "COMMIT_DATE" "$(TZ=UTC git log --since='0:00' --date=short-local --format=%cd -1)" +set_output "COMMIT_NUMBER_OF_DAY" "$COUNT" +set_output "COMMIT_DATE" "$(TZ=UTC git log --since='0:00' --date=short-local --format=%cd -1)" |