update-apps.sh 975 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 stable30
  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 stable30 and pulls quietly
  14. # - shows the 3 most recent commits for context
  15. # - removes branches merged into stable30
  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 stable30 && git pull --quiet -p && git --no-pager log -3 --pretty=format:"%h %Cblue%ar%x09%an %Creset%s" && printf "\n" && git branch --merged stable30 | grep -v "stable30$" | xargs git branch -d && cd ..' \;