From 736e06520a7b3903c627008b9fd9e968bebe6cc0 Mon Sep 17 00:00:00 2001 From: Michael Russell Date: Wed, 17 Apr 2019 19:54:37 +0100 Subject: [PATCH] Always run from the relative parent directory This is mainly to prevent the bumper.py script from modifying the wrong files if it is run from a different directory. Addresses: https://github.com/elastic/helm-charts/pull/96#discussion_r276026487 --- helpers/bumper.py | 2 +- helpers/release.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helpers/bumper.py b/helpers/bumper.py index 1d0e78142..229dc0f49 100755 --- a/helpers/bumper.py +++ b/helpers/bumper.py @@ -5,7 +5,7 @@ import subprocess import fileinput -os.chdir('../') +os.chdir(os.path.join(os.path.dirname(__file__), '..')) versions = { 5: '5.6.16', diff --git a/helpers/release.py b/helpers/release.py index 713c3c9ca..264b23ddc 100644 --- a/helpers/release.py +++ b/helpers/release.py @@ -5,7 +5,7 @@ import subprocess import yaml -os.chdir('..') +os.chdir(os.path.join(os.path.dirname(__file__), '..')) bucket = 'gs://' + os.environ['GCS_BUCKET']