[riot-notifications] [RIOT-OS/RIOT] build system: add fallback for RIOT_VERSION_CODE (#16895)

Martine Lenders notifications at github.com
Mon Sep 27 09:31:39 CEST 2021


@miri64 commented on this pull request.



> @@ -530,7 +531,8 @@ endif
 
 # Generate machine readable RIOT VERSION macro
 RIOT_VERSION_CODE ?= $(shell echo ${RIOT_VERSION} | \
-                      sed -E 's/([0-9]+).([0-9]+).?([0-9]+)?.*/RIOT_VERSION_NUM\\\(\1,\2,0\3,${RIOT_EXTRAVERSION}\\\)/')
+                      sed -E 's/([0-9]+).([0-9]+).?([0-9]+)?.*/RIOT_VERSION_NUM\\\(\1,\2,0\3,${RIOT_EXTRAVERSION}\\\)/' | \
+                      grep RIOT_VERSION_NUM && echo -n "" || echo "${RIOT_VERSION_DUMMY_CODE}")

But you do not need to have a no-op. `grep` will return the matching line (which is the only one printed) just fine and have a 0 exit code...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16895#discussion_r716428933
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210927/43d0d976/attachment.htm>


More information about the notifications mailing list