Skip to content

Commit c421681

Browse files
authored
substitute version in (#17)
* substitute version in * try env here * try env here * define default version of 0.0.0 * accidental paste
1 parent df9b4c6 commit c421681

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
build:
1515
name: Build
1616
runs-on: ubuntu-latest
17+
needs:
18+
- semver
1719
steps:
1820
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
1921
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
@@ -27,6 +29,8 @@ jobs:
2729
- uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8 # v0.3
2830
with:
2931
runCmd: rake build
32+
env: |
33+
VERSION=${{ needs.semver.outputs.semantic_version}}
3034
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
3135
with:
3236
name: firmware-factory.bin

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ end
66
desc "Build/Compile with esphome"
77
task :build do
88
sh '[ ! -f "lexis.ttf" ] && wget -L -O "lexis.ttf" "https://github.com/damianvila/font-lexis/raw/main/fonts/lexis.ttf" || true'
9-
sh "esphome compile childrensclock.yaml"
9+
sh "esphome -s VERSION ${VERSION:=0.0.0} compile childrensclock.yaml"
1010
end

childrensclock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ esphome:
2828
- src/childrensclock.h
2929
project:
3030
name: chrisns.childrens-clock
31-
version: 0.0.1
31+
version: $VERSION
3232
on_boot:
3333
priority: 700
3434
then:

0 commit comments

Comments
 (0)