Skip to content

Commit

Permalink
Dynamically get the version again (#9)
Browse files Browse the repository at this point in the history
* Dynamically get the version again

* Update get/rootfs/etc/addon/run

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>

---------

Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
  • Loading branch information
ludeeus and c0ffeeca7 authored Aug 21, 2024
1 parent 60f6544 commit 792edaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion get/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Get HACS
version: "1.2.1"
version: "1.3.0"
slug: get
image: "ghcr.io/hacs/{arch}-addon-get"
description: The easiest way to get HACS for Home Assistant
Expand Down
6 changes: 4 additions & 2 deletions get/rootfs/etc/addon/run
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ elif bashio::var.equals "${CHANNEL}" "development"; then
bash ./scripts/install/frontend

bashio::log.info "Injecting a version..."
updated_version="2.0.0-dev-$(git rev-parse --short HEAD)"
current_tag="$(git describe --tags --abbrev=0)"
current_commit="$(git rev-parse --short HEAD)"
updated_version="$(echo ${current_tag} | awk -F. -v OFS=. '{$NF += 1 ; print}')-dev-${current_commit}"
python3 ./scripts/update/manifest.py --version "${updated_version}"
bashio::log.info "Version set to: ${updated_version}"

Expand All @@ -44,7 +46,7 @@ elif bashio::var.equals "${CHANNEL}" "development"; then
rm -rf /tmp/hacs

bashio::log.info "Download complete..."
bashio::log.info "Remember to restart Home Assistant before you configure it..."
bashio::log.info "Now, restart Home Assistant. Then, configure it."

else
bashio::exit.nok "Invalid channel!"
Expand Down

0 comments on commit 792edaf

Please sign in to comment.