Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit c7b163d

Browse files
committed
Reporting version from release.txt
1 parent 3947bcd commit c7b163d

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,20 @@ help:
162162
@echo " Exports a program for a single target into a standalone"
163163
@echo " project directory at STANDALONE_DEST."
164164
@echo ""
165+
@echo " version"
166+
@echo " Report the release version for Freedom-E-SDK, Metal library"
167+
@echo " and its tools if it has one."
168+
@echo ""
165169
@echo " open-docs"
166170
@echo " Opens the Freedom E SDK documentation in your HTML"
167171
@echo " viewer of choice. The documentation can also be found"
168172
@echo " online at"
169173
@echo " https://sifive.github.io/freedom-e-sdk-docs/index.html"
170174

175+
.PHONY: version
176+
version: scripts/report-version
177+
$^
178+
171179
.PHONY: open-docs
172180
open-docs: scripts/open-docs
173181
$^

scripts/report-version

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
if [ ! -f release.txt ] ; then
6+
>&2 echo "This is a non IPDelivery Freedom-E-SDK environment"
7+
else
8+
>&2 echo "IPDelivery Freedom-E-SDK environment"
9+
>&2 grep "Date:" release.txt
10+
>&2 grep "Release:" release.txt
11+
fi
12+

0 commit comments

Comments
 (0)