File tree Expand file tree Collapse file tree
src/artifacts-helper/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,26 +78,10 @@ if [[ "$1" == "account" && "$2" == "get-access-token" ]]; then
7878 exit_code=$?
7979
8080 if [[ $exit_code -eq 0 && -n " $token " ]]; then
81- # Calculate expiry timestamps (conservative 1 hour estimate)
82- # expires_on = POSIX timestamp, expiresOn = local datetime
83- if date --version > /dev/null 2>&1 ; then
84- # GNU date (Linux)
85- expires_on=$( date -d " +1 hour" " +%s" )
86- expires_on_datetime=$( date -d " +1 hour" " +%Y-%m-%d %H:%M:%S.000000" )
87- else
88- # BSD date (macOS)
89- expires_on=$( date -v+1H " +%s" )
90- expires_on_datetime=$( date -v+1H " +%Y-%m-%d %H:%M:%S.000000" )
91- fi
92-
93- # Return in az CLI JSON format (matching real az CLI output)
81+ # Return in az CLI JSON format
9482 cat << EOF
9583{
9684 "accessToken": "${token} ",
97- "expiresOn": "${expires_on_datetime} ",
98- "expires_on": ${expires_on} ,
99- "subscription": "",
100- "tenant": "",
10185 "tokenType": "Bearer"
10286}
10387EOF
@@ -114,4 +98,4 @@ if [[ -n "$AZ_EXE" ]]; then
11498else
11599 echo " Error: Azure CLI not found in PATH" >&2
116100 exit 1
117- fi
101+ fi
You can’t perform that action at this time.
0 commit comments