Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Last active September 30, 2019 00:42
Show Gist options
  • Save garrytrinder/17a91c9762cf6f141bc912bc79480c3c to your computer and use it in GitHub Desktop.
Save garrytrinder/17a91c9762cf6f141bc912bc79480c3c to your computer and use it in GitHub Desktop.
teams-app-CD
o365 login -t password -u $(username) -p $(password)
$apps = o365 teams app list -o json | ConvertFrom-Json
$app = $apps | Where-Object { $_.externalId -eq $env:APPID}
if ($app -eq $null) {
# install app
o365 teams app publish -p $(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip
} else {
# update app
o365 teams app update -i $app.id -p $(System.DefaultWorkingDirectory)/teams-app-CI/package/teams-app.zip
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment