Fix for fabric-tofino-build.
fabric-tofino checks out the artifacts generated by the p4 compiler,
this creates an issue during the tagging process due to check done
for the pending changes.
Cleans the fabric-tofino folder after the build. In this way, the
subsequent build done for the tag does not fail.
Change-Id: I02aa86093d35813e9c04ed4eaa5be200127f5b25
diff --git a/app-build.sh b/app-build.sh
index a14ff85..473eb29 100755
--- a/app-build.sh
+++ b/app-build.sh
@@ -177,6 +177,10 @@
FABRIC_TOFINO_OAR="${FABRIC_TOFINO_ROOT}"/target/"${FABRIC_TOFINO_ARTIFACTID}"-"${PROJECT_VERSION}".oar
fi
cp "${FABRIC_TOFINO_OAR}" "${LOCAL_APPS}"/
+ # Extra step to avoid build failure; clean up artifacts to ensure
+ # the release process won't complain about uncommitted changes.
+ cd "${FABRIC_TOFINO_ROOT}" || exit 1 && git checkout .
+ cd ../
}
function up4-build {