Skip to content

Commit d3e8deb

Browse files
authored
Merge pull request #693 from orgads/dasel-2.3.4
chore: update dasel to 2.4.1
2 parents 42fbf59 + 1506a2e commit d3e8deb

File tree

4 files changed

+8
-63
lines changed

4 files changed

+8
-63
lines changed

influxdb/2.7/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ RUN case "$(dpkg --print-architecture)" in \
1717
*arm64) arch=arm64 ;; \
1818
*) echo 'Unsupported architecture' && exit 1 ;; \
1919
esac && \
20-
curl -fLo /usr/local/bin/dasel "https://github.com/TomWright/dasel/releases/download/v2.1.2/dasel_linux_${arch}" && \
20+
curl -fL "https://github.com/TomWright/dasel/releases/download/v2.4.1/dasel_linux_${arch}.gz" | gzip -d > /usr/local/bin/dasel && \
2121
case ${arch} in \
22-
amd64) echo 'e4b43d8c7d76904e2401dc81de0900d9cb69b006794ff3901ec5d50e96baa8ef /usr/local/bin/dasel' ;; \
23-
arm64) echo '92b83f30949679197403ff7a7e0f9ef3e458c1c55031d9c1bc112364e487d57d /usr/local/bin/dasel' ;; \
22+
amd64) echo '8e9fb0aa24e35774fab792005f05f9df141c22ec0a7436c7329a932582a10200 /usr/local/bin/dasel' ;; \
23+
arm64) echo '535f0f4c6362aa4b773664f7cfdb52d86f2723eac52a1aca6dfc6a69e2341c17 /usr/local/bin/dasel' ;; \
2424
esac | sha256sum -c - && \
2525
chmod +x /usr/local/bin/dasel && \
2626
dasel --version

influxdb/2.7/alpine/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ RUN case "$(apk --print-arch)" in \
1717
aarch64) arch=arm64 ;; \
1818
*) echo 'Unsupported architecture' && exit 1 ;; \
1919
esac && \
20-
curl -fLo /usr/local/bin/dasel "https://github.com/TomWright/dasel/releases/download/v2.1.2/dasel_linux_${arch}" && \
20+
curl -fL "https://github.com/TomWright/dasel/releases/download/v2.4.1/dasel_linux_${arch}.gz" | gzip -d > /usr/local/bin/dasel && \
2121
case ${arch} in \
22-
amd64) echo 'e4b43d8c7d76904e2401dc81de0900d9cb69b006794ff3901ec5d50e96baa8ef /usr/local/bin/dasel' ;; \
23-
arm64) echo '92b83f30949679197403ff7a7e0f9ef3e458c1c55031d9c1bc112364e487d57d /usr/local/bin/dasel' ;; \
22+
amd64) echo '8e9fb0aa24e35774fab792005f05f9df141c22ec0a7436c7329a932582a10200 /usr/local/bin/dasel' ;; \
23+
arm64) echo '535f0f4c6362aa4b773664f7cfdb52d86f2723eac52a1aca6dfc6a69e2341c17 /usr/local/bin/dasel' ;; \
2424
esac | sha256sum -c - && \
2525
chmod +x /usr/local/bin/dasel && \
2626
dasel --version

influxdb/2.7/alpine/entrypoint.sh

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ function influxd::config::get()
151151
#
152152

153153
local value
154-
local default
155154

156155
# If no command line arguments match, retrieve the corresponding environment
157156
# variable. This differentiates between unset and empty variables. If empty,
@@ -166,34 +165,8 @@ function influxd::config::get()
166165
# Parse Value from Configuration
167166
#
168167

169-
case ${INFLUXD_CONFIG_PATH,,} in
170-
*.toml) local influxd_config_format=toml ;;
171-
*.json) local influxd_config_format=json ;;
172-
*.yaml|*.yml) local influxd_config_format=yaml ;;
173-
esac
174-
175-
# Unfortunately, dasel does not provide a method to test for the existence
176-
# of a particular key. However, it returns with an error if it attempts to
177-
# delete a nonexistent key. Since dasel will automatically update the
178-
# configuration file, it is passed via `STDIN` to avoid this behavior.
179-
if dasel -r "${influxd_config_format}" delete "${primary_key}" <"${INFLUXD_CONFIG_PATH}" &>/dev/null
180-
then
181-
# Unfortunately, dasel has inconsistent string displaying behavior. For
182-
# yaml and toml, it will display the value without double-quotes unless
183-
# the string is empty. However, for json, it always with double-quotes.
184-
# This always strips the first leading and trailing double-quotes, as
185-
# they are almost always not required.
186-
value="$(dasel -f "${INFLUXD_CONFIG_PATH}" -s "${primary_key}")"
187-
188-
( # strip leading and trailing " characters
189-
shopt -s extglob
190-
value="${value#'"'}"
191-
value="${value%'"'}"
192-
echo "${value}"
193-
)
194-
else
168+
dasel -f "${INFLUXD_CONFIG_PATH}" -s "${primary_key}" -w - 2>/dev/null || \
195169
table::get "${primary_key}" "${COLUMN_DEFAULT}"
196-
fi
197170
}
198171

199172
function set_data_paths () {

influxdb/2.7/entrypoint.sh

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ function influxd::config::get()
151151
#
152152

153153
local value
154-
local default
155154

156155
# If no command line arguments match, retrieve the corresponding environment
157156
# variable. This differentiates between unset and empty variables. If empty,
@@ -165,35 +164,8 @@ function influxd::config::get()
165164
#
166165
# Parse Value from Configuration
167166
#
168-
169-
case ${INFLUXD_CONFIG_PATH,,} in
170-
*.toml) local influxd_config_format=toml ;;
171-
*.json) local influxd_config_format=json ;;
172-
*.yaml|*.yml) local influxd_config_format=yaml ;;
173-
esac
174-
175-
# Unfortunately, dasel does not provide a method to test for the existence
176-
# of a particular key. However, it returns with an error if it attempts to
177-
# delete a nonexistent key. Since dasel will automatically update the
178-
# configuration file, it is passed via `STDIN` to avoid this behavior.
179-
if dasel -r "${influxd_config_format}" delete "${primary_key}" <"${INFLUXD_CONFIG_PATH}" &>/dev/null
180-
then
181-
# Unfortunately, dasel has inconsistent string displaying behavior. For
182-
# yaml and toml, it will display the value without double-quotes unless
183-
# the string is empty. However, for json, it always with double-quotes.
184-
# This always strips the first leading and trailing double-quotes, as
185-
# they are almost always not required.
186-
value="$(dasel -f "${INFLUXD_CONFIG_PATH}" -s "${primary_key}")"
187-
188-
( # strip leading and trailing " characters
189-
shopt -s extglob
190-
value="${value#'"'}"
191-
value="${value%'"'}"
192-
echo "${value}"
193-
)
194-
else
167+
dasel -f "${INFLUXD_CONFIG_PATH}" -s "${primary_key}" -w - 2>/dev/null || \
195168
table::get "${primary_key}" "${COLUMN_DEFAULT}"
196-
fi
197169
}
198170

199171
function set_data_paths () {

0 commit comments

Comments
 (0)