Skip to content

Commit 792edaf

Browse files
ludeeusc0ffeeca7
andauthored
Dynamically get the version again (hacs#9)
* Dynamically get the version again * Update get/rootfs/etc/addon/run Co-authored-by: c0ffeeca7 <[email protected]> --------- Co-authored-by: c0ffeeca7 <[email protected]>
1 parent 60f6544 commit 792edaf

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

get/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Get HACS
2-
version: "1.2.1"
2+
version: "1.3.0"
33
slug: get
44
image: "ghcr.io/hacs/{arch}-addon-get"
55
description: The easiest way to get HACS for Home Assistant

get/rootfs/etc/addon/run

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ elif bashio::var.equals "${CHANNEL}" "development"; then
3333
bash ./scripts/install/frontend
3434

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

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

4648
bashio::log.info "Download complete..."
47-
bashio::log.info "Remember to restart Home Assistant before you configure it..."
49+
bashio::log.info "Now, restart Home Assistant. Then, configure it."
4850

4951
else
5052
bashio::exit.nok "Invalid channel!"

0 commit comments

Comments
 (0)