Skip to content

Commit efd0039

Browse files
authored
Clean version_tag function (#123)
1 parent cae7734 commit efd0039

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

builder.sh

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,6 @@ function build_base() {
368368
local repository=
369369
local shadow_repository=
370370
local raw_image=
371-
local version_tag=false
372371
local args=
373372
local codenotary_base=
374373
local codenotary_sign=
@@ -381,7 +380,6 @@ function build_base() {
381380
args="$(jq --raw-output '.args // empty | keys[]' "/tmp/build_config/build.json")"
382381
labels="$(jq --raw-output '.labels // empty | keys[]' "/tmp/build_config/build.json")"
383382
raw_image="$(jq --raw-output '.image // empty' "/tmp/build_config/build.json")"
384-
version_tag="$(jq --raw-output '.version_tag // false' "/tmp/build_config/build.json")"
385383
shadow_repository="$(jq --raw-output '.shadow_repository // empty' "/tmp/build_config/build.json")"
386384
codenotary_base="$(jq --raw-output '.codenotary.base_image // empty' "/tmp/build_config/build.json")"
387385
codenotary_sign="$(jq --raw-output '.codenotary.signer // empty' "/tmp/build_config/build.json")"
@@ -535,7 +533,6 @@ function build_generic() {
535533
local repository=
536534
local shadow_repository=
537535
local raw_image=
538-
local version_tag=false
539536
local args=
540537
local codenotary_base=
541538
local codenotary_sign=
@@ -548,7 +545,6 @@ function build_generic() {
548545
args="$(jq --raw-output '.args // empty | keys[]' "/tmp/build_config/build.json")"
549546
labels="$(jq --raw-output '.labels // empty | keys[]' "/tmp/build_config/build.json")"
550547
raw_image="$(jq --raw-output '.image // empty' "/tmp/build_config/build.json")"
551-
version_tag="$(jq --raw-output '.version_tag // false' "/tmp/build_config/build.json")"
552548
shadow_repository="$(jq --raw-output '.shadow_repository // empty' "/tmp/build_config/build.json")"
553549
codenotary_base="$(jq --raw-output '.codenotary.base_image // empty' "/tmp/build_config/build.json")"
554550
codenotary_sign="$(jq --raw-output '.codenotary.signer // empty' "/tmp/build_config/build.json")"
@@ -584,17 +580,6 @@ function build_generic() {
584580
done
585581
fi
586582

587-
# Version Tag
588-
if bashio::var.true "$version_tag"; then
589-
if [[ "$VERSION" =~ d ]]; then
590-
docker_tags+=("dev")
591-
elif [[ "$VERSION" =~ b ]]; then
592-
docker_tags+=("beta")
593-
else
594-
docker_tags+=("stable")
595-
fi
596-
fi
597-
598583
# Start build
599584
run_build "$TARGET" "$repository" "$image" "$VERSION" \
600585
"$build_from" "$build_arch" docker_cli[@] docker_tags[@] "${shadow_repository}" \
@@ -612,7 +597,6 @@ function build_machine() {
612597
local raw_image=
613598
local build_from=
614599
local shadow_repository=
615-
local version_tag=false
616600
local codenotary_base=
617601
local codenotary_sign=
618602
local docker_cli=()
@@ -624,7 +608,6 @@ function build_machine() {
624608
args="$(jq --raw-output '.args // empty | keys[]' "/tmp/build_config/build.json")"
625609
labels="$(jq --raw-output '.labels // empty | keys[]' "/tmp/build_config/build.json")"
626610
raw_image="$(jq --raw-output '.image // empty' "/tmp/build_config/build.json")"
627-
version_tag="$(jq --raw-output '.version_tag // false' "/tmp/build_config/build.json")"
628611
shadow_repository="$(jq --raw-output '.shadow_repository // empty' "/tmp/build_config/build.json")"
629612
codenotary_base="$(jq --raw-output '.codenotary.base_image // empty' "/tmp/build_config/build.json")"
630613
codenotary_sign="$(jq --raw-output '.codenotary.signer // empty' "/tmp/build_config/build.json")"
@@ -667,17 +650,6 @@ function build_machine() {
667650
# Set labels
668651
docker_cli+=("--label" "io.hass.machine=${build_machine}")
669652

670-
# Version Tag
671-
if bashio::var.true "${version_tag}"; then
672-
if [[ "${VERSION}" =~ d ]]; then
673-
docker_tags+=("dev")
674-
elif [[ "${VERSION}" =~ b ]]; then
675-
docker_tags+=("beta")
676-
else
677-
docker_tags+=("stable")
678-
fi
679-
fi
680-
681653
# Start build
682654
run_build "${TARGET}" "${repository}" "${image}" "${VERSION}" \
683655
"${build_from}" "${build_arch}" docker_cli[@] docker_tags[@] "${shadow_repository}" \

0 commit comments

Comments
 (0)