Compile Tracker-edge firmware with Particle CLI

@nrobinson2000
I was also looking to pass a variable TARGET_VERSION into neopo compile as discussed in this thread but was not able to do so successfully.
The command I use is

neopo configure tracker 3.3.0 myProject
cd myProject
neopo flags "-DTARGET_VERSION=28" 
neopo compile

This is my main.cpp

#include "Particle.h"

#include "tracker_config.h"
#include "tracker.h"

#ifndef TARGET_VERSION
#define TARGET_VERSION 30 // fall back value
#endif


PRODUCT_ID(_SOME_ID);
PRODUCT_VERSION(TARGET_VERSION);
...

I confirmed that the flag value is correctly set to 28 as shown in neopo-compile-user.sh

#!/bin/sh
PATH="$PATH:/root/.particle/toolchains/gcc-arm/10.2.1/bin:/root/.particle/toolchains/buildtools/1.1.1"

make -sf /root/.particle/toolchains/buildscripts/1.11.0/Makefile \
PARTICLE_CLI_PATH=/root/.neopo/particle \
APPDIR=/root/myProject \
DEVICE_OS_PATH=/root/.particle/toolchains/deviceOS/3.3.0 \
PLATFORM=tracker \
EXTRA_CFLAGS=-DTARGET_VERSION=28 \ <== correct value
compile-user

Please let me know if I’m missing anything. Thank you.