Skip to content

Commit dae9b62

Browse files
committed
Overwrite profile_expire_date for GitHub built
1 parent dc5316c commit dae9b62

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Scripts/capture-build-details.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,14 @@ then
8989
if [ -n "$branch" ]; then
9090
plutil -replace com-loopkit-LoopWorkspace-git-branch -string "${branch}" "${info_plist_path}"
9191
fi
92+
# determine if this is a GitHub Action build (with 90 day expiration)
93+
folderName=$(pwd)
94+
runnerString="/Users/runner"
95+
if [ "${folderName:0:13}" == "$runnerString" ]; then
96+
# overwrite profile_expire_date
97+
profile_expire_date=$(date -j -v+90d +"%Y-%m-%dT%H:%M:%SZ")
98+
echo "runnerString detected, update profile_expire_date to ${profile_expire_date}"
99+
plutil -replace com-loopkit-Loop-profile-expiration -date "${profile_expire_date}" "${info_plist_path}"
100+
fi
92101
popd . > /dev/null
93102
fi

0 commit comments

Comments
 (0)