Added a heredoc to get-token.

This commit is contained in:
2025-11-08 10:32:30 +01:00
parent 54361e6c18
commit 086618fe72

View File

@@ -1,4 +1,19 @@
#!/usr/bin/env python3
"""
Get an Azure DevOps token and print it in a format suitable for exporting as an environment variable.
Usage:
eval $(python get-token.py)
or
python get-token.py > set-ado-token.sh
source set-ado-token.sh
Now you can use the ADO_TOKEN environment variable, for example using curl:
curl -H "Authorization: Bearer $ADO_TOKEN" https://dev.azure.com/your_organization/_apis/projects?api-version=7.1
"""
from sk.azure import get_token