do not use protected variable name in updater script (#4902)
Paweł Krupa committed
Dec 3, 2018 at 16:10 UTC
a0770201adc170f4a61ca43b7435cace7f03f7a9
2 files changed
+4
-4
.travis.yml
+1
-1
@@ -46,7 +46,7 @@ jobs:
46
47
- stage: packaging
48
name: Create release
49
- install: sudo apt update -y && sudo apt-get install -y gnupg libcap2-bin zlib1g-dev uuid-dev fakeroot python-pip && sudo apt install -y --only-upgrade docker-ce && docker info
49
+ install: sudo apt update -y --allow-unauthenticated && sudo apt-get install --allow-unauthenticated -y gnupg libcap2-bin zlib1g-dev uuid-dev fakeroot python-pip && sudo apt install --allow-unauthenticated -y --only-upgrade docker-ce && docker info
50
before_script: sudo pip install git-semver
51
script: ".travis/releaser.sh && .travis/labeler.sh" # labeler should be replaced with GitHub Actions when they hit GA
52
git:
installer/netdata-updater.sh
+3
-3
@@ -19,10 +19,9 @@ cd "${REINSTALL_PWD}" || exit 1
19
#shellcheck source=/dev/null
20
source installer/.environment.sh || exit 1
21
22
-UID="$(id -u)"
23
-if [ "${INSTALL_UID}" != "${UID}" ]
22
+if [ "${INSTALL_UID}" != "$(id -u)" ]
23
then
25
- echo >&2 "You are running this script as user with uid ${UID}. We recommend to run this script as root (user with uid 0)"
24
+ echo >&2 "You are running this script as user with uid $(id -u). We recommend to run this script as root (user with uid 0)"
25
exit 1
26
fi
27
@@ -100,6 +99,7 @@ update() {
99
git fetch --tags >&3
100
git checkout origin/master >&3
101
git reset --hard origin/master >&3
102
+ git pull >&3
103
104
new_commit="$(get_latest_commit_id)"
105
if [ ${force} -eq 0 ]; then