From f8a1973f69be81c2bf3067407de2459894fe617b Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Thu, 15 Jun 2023 19:07:46 -0700 Subject: [PATCH] Testing --- .drone.yml | 4 ---- build-tools/upload-new-versions.sh | 7 +++++-- charts/hello-world/a-new-file | 0 charts/media-share/a-new-file | 0 4 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 charts/hello-world/a-new-file create mode 100644 charts/media-share/a-new-file diff --git a/.drone.yml b/.drone.yml index 6b238c2..d702214 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,10 +6,6 @@ platform: os: linux arch: arm64 -trigger: - branch: - - main - steps: - name: step1 image: alpine diff --git a/build-tools/upload-new-versions.sh b/build-tools/upload-new-versions.sh index 11bceae..755e814 100755 --- a/build-tools/upload-new-versions.sh +++ b/build-tools/upload-new-versions.sh @@ -18,11 +18,14 @@ do # e.g. hello-world-0.1.1 file_metadata=$(echo $output_location | rev | cut -d '/' -f 1 | cut -c 5- | rev); chart_name=$(echo $file_metadata | rev | cut -d '-' -f 2- | rev); + echo "$chart_name" chart_version=$(echo $file_metadata | rev | cut -d '-' -f 1 | rev); - if [[ $(echo $current_versions | grep "$chart_name___$chart_version" | wc -l ) -eq 1 ]]; then + echo "$chart_version" + search_string="$chart_name""___""$chart_version"; + echo "$search_string" + if [[ $(echo $current_versions | grep "$search_string" | wc -l ) -eq 1 ]]; then # I.e. if the current version in the repo is the same as what we're trying to push # TODO - should we check that we're pushing a _newer_ version? - # TODO - does the API only show the current version, or all versions? echo "Version clash ($chart_version) for $chart_name"; exit 1; else diff --git a/charts/hello-world/a-new-file b/charts/hello-world/a-new-file new file mode 100644 index 0000000..e69de29 diff --git a/charts/media-share/a-new-file b/charts/media-share/a-new-file new file mode 100644 index 0000000..e69de29