Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Created October 6, 2019 01:32
Show Gist options
  • Save garrytrinder/b1bc32639cc654477d54063af080f3b9 to your computer and use it in GitHub Desktop.
Save garrytrinder/b1bc32639cc654477d54063af080f3b9 to your computer and use it in GitHub Desktop.
o365 login -t password -u $(username) -p $(password)
app=$(o365 teams app list -o json | jq '.[] | select(.externalId == "'"$APPID"'")')
if [ -z "$app" ]; then
# install app
o365 teams app publish -p "$(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip"
else
# update app
appId=$(echo $app | jq '.id')
o365 teams app update -i $appId -p "$(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment