Skip to content

Commit

Permalink
CI should now generate version.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus10110 committed Oct 26, 2021
1 parent 31a4d95 commit 269983e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ jobs:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# for CI builds. edit version.h to contain the branch name
- name: write version.h
run: |
export BRANCH_OR_TAG=${GITHUB_REF#refs/*/}
echo BRANCH_OR_TAG
echo "#define VERSION \"${BRANCH_OR_TAG}\"" > version.h
cat version.h
# Runs a single command using the runners shell
- name: Setup Arduino Build
run: ci/setup.sh
Expand Down
4 changes: 2 additions & 2 deletions DelSolClock.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <TinyGPSPlus.h>

// define this when targeting a Adafruit Feather board, instead of a Del Sol Clock. Useful for testing BLE.
#define DEVKIT_ONLY 1
// #define DISABLE_SLEEP 1
namespace
{
bool FwUpdateInProgress = false;
Expand Down Expand Up @@ -67,7 +67,7 @@ void setup()

void HandlePowerState( const CarIO::CarStatus& car_status )
{
#ifdef DEVKIT_ONLY
#ifdef DISABLE_SLEEP
return;
#endif
// if IGN and Illumination are off, go to sleep.
Expand Down

0 comments on commit 269983e

Please sign in to comment.