I want read version name from app/gradle in android . Unfortunately I am getting null value. I have used the below script. Correct me if I am wrong. Thanks !
#!/usr/bin/env bash
set -e
POR="$(cat app/build.gradle | grep -o “versionName\s+[*]+” | awk ‘{ print $2 }’)"
envman add --key CURRENT_VERSION_NAME --value “$POR”
envman add --key=MY_TIMESTAMP --value="$(date +"%y%m%d")"