File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,10 +83,12 @@ jobs:
8383 id : elastic-version
8484 if : contains(matrix.distro, 'ubuntu') || contains(matrix.distro, 'debian')
8585 run : |
86- VERSION=$( curl -fsSL \
86+ curl -fsSL \
8787 "https://artifacts.elastic.co/packages/${{ matrix.release }}.x/apt/dists/stable/main/binary-amd64/Packages.gz" \
88- | zcat \
89- | awk '/^Package: elasticsearch$/{found=1} found && /^Version:/{print $2; exit}')
88+ -o /tmp/elastic-packages.gz
89+ VERSION=$(zcat /tmp/elastic-packages.gz \
90+ | awk '/^Package: elasticsearch$/{f=1} f && /^Version:/ && !v{v=$2; f=0} END{print v}')
91+ rm -f /tmp/elastic-packages.gz
9092 echo "version=${VERSION}" >> $GITHUB_OUTPUT
9193
9294 - name : Debug - latest Elasticsearch version
@@ -204,10 +206,12 @@ jobs:
204206 id : elastic-version
205207 if : contains(matrix.distro, 'ubuntu') || contains(matrix.distro, 'debian')
206208 run : |
207- VERSION=$( curl -fsSL \
209+ curl -fsSL \
208210 "https://artifacts.elastic.co/packages/${{ matrix.release }}.x/apt/dists/stable/main/binary-amd64/Packages.gz" \
209- | zcat \
210- | awk '/^Package: elasticsearch$/{found=1} found && /^Version:/{print $2; exit}')
211+ -o /tmp/elastic-packages.gz
212+ VERSION=$(zcat /tmp/elastic-packages.gz \
213+ | awk '/^Package: elasticsearch$/{f=1} f && /^Version:/ && !v{v=$2; f=0} END{print v}')
214+ rm -f /tmp/elastic-packages.gz
211215 echo "version=${VERSION}" >> $GITHUB_OUTPUT
212216
213217 - name : Debug - latest Elasticsearch version
You can’t perform that action at this time.
0 commit comments