๐Ÿ“ฆ Pierstoval / php-js-boilerplate

๐Ÿ“„ update_dependencies.bash ยท 31 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31#!/usr/bin/env bash

set -eu

CWD=$(realpath "$(dirname "${BASH_SOURCE[0]}")")

cd "$CWD"

info() {
    printf " %s" "$1"
}
err() {
    printf " \033[31m[ERROR]\033[0m %s\n" "$1"
}
ok() {
    printf " \033[32m%s\033[0m\n" "Done!"
}

info "Remove dependencies" 
rm -rf frontend/node_modules backend/vendor
ok

info "Update frontend dependencies"
pnpm --dir=frontend upgrade --latest
ok

info "Update backend dependencies"
composer --working-dir=backend update --with-all-dependencies --no-scripts --no-interaction
ok