-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_packages.sh
executable file
·26 lines (18 loc) · 1.12 KB
/
update_packages.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Step 1: update meteor core and related packages
# -----------------------------------------------------------------------------
# pass all package dirs as parameters to the script call or put them in here
PACKAGE_DIRS="../lib:../liboauth:../libnpm"
METEOR_PACKAGE_DIRS=${PACKAGE_DIRS} meteor update --all-packages
# -----------------------------------------------------------------------------
# Step 2: update all outdated npm packages to the latest
# thanks to: https://stackoverflow.com/a/55406675/3098783
# -----------------------------------------------------------------------------
meteor npm install $(meteor npm outdated | cut -d' ' -f 1 | sed '1d' | xargs -I '$' echo '$@latest' | xargs echo)
# -----------------------------------------------------------------------------
# Step 3: clean installed modules because some modules are broken
# after an update (mostly related to modules that needs to be built)
# -----------------------------------------------------------------------------
rm -rf ./node_modules
meteor npm install