1
0

update-apps.sh 963 B

123456789101112131415161718
  1. #!/bin/bash
  2. #
  3. # SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
  4. # SPDX-License-Identifier: AGPL-3.0-or-later
  5. #
  6. # Update Nextcloud apps from latest git master
  7. # For local development environment
  8. # Use from Nextcloud server folder with `./build/update-apps.sh`
  9. #
  10. # It automatically:
  11. # - goes through all apps which are not shipped via server
  12. # - shows the app name in bold and uses whitespace for separation
  13. # - changes to master and pulls quietly
  14. # - shows the 3 most recent commits for context
  15. # - removes branches merged into master
  16. # - … could even do the build steps if they are consistent for the apps (like `make`)
  17. find apps* -maxdepth 2 -name .git -exec sh -c 'cd {}/../ && printf "\n\033[1m${PWD##*/}\033[0m\n" && git checkout master && git pull --quiet -p && git --no-pager log -3 --pretty=format:"%h %Cblue%ar%x09%an %Creset%s" && printf "\n" && git branch --merged master | grep -v "master$" | xargs git branch -d && cd ..' \;