Selaa lähdekoodia

Emit build info files in Android and iOS build scripts

Rod Hynes 6 vuotta sitten
vanhempi
sitoutus
d37b577482

+ 3 - 0
MobileLibrary/Android/make.bash

@@ -20,6 +20,7 @@ if [ $? != 0 ]; then
   exit $?
   exit $?
 fi
 fi
 
 
+BUILDINFOFILE="psiphon-tunnel-core_buildinfo.txt"
 BUILDDATE=$(date --iso-8601=seconds)
 BUILDDATE=$(date --iso-8601=seconds)
 BUILDREPO=$(git config --get remote.origin.url)
 BUILDREPO=$(git config --get remote.origin.url)
 BUILDREV=$(git rev-parse --short HEAD)
 BUILDREV=$(git rev-parse --short HEAD)
@@ -46,6 +47,8 @@ LDFLAGS="\
 -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.dependencies=$DEPENDENCIES \
 -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.dependencies=$DEPENDENCIES \
 "
 "
 
 
+echo -e "${BUILDDATE}\n${BUILDREPO}\n${BUILDREV}\n" > $BUILDINFOFILE
+
 echo "Variables for ldflags:"
 echo "Variables for ldflags:"
 echo " Build date: ${BUILDDATE}"
 echo " Build date: ${BUILDDATE}"
 echo " Build repo: ${BUILDREPO}"
 echo " Build repo: ${BUILDREPO}"

+ 3 - 0
MobileLibrary/iOS/build-psiphon-framework.sh

@@ -126,6 +126,7 @@ fi
 # Ensure BUILD* variables reflect the tunnel-core repo
 # Ensure BUILD* variables reflect the tunnel-core repo
 cd ${TUNNEL_CORE_SRC_DIR}
 cd ${TUNNEL_CORE_SRC_DIR}
 
 
+BUILDINFOFILE="${BASE_DIR}/psiphon-tunnel-core_buildinfo.txt"
 BUILDDATE=$(date +%Y-%m-%dT%H:%M:%S%z)
 BUILDDATE=$(date +%Y-%m-%dT%H:%M:%S%z)
 BUILDREPO=$(git config --get remote.origin.url)
 BUILDREPO=$(git config --get remote.origin.url)
 BUILDREV=$(git rev-parse --short HEAD)
 BUILDREV=$(git rev-parse --short HEAD)
@@ -147,6 +148,8 @@ LDFLAGS="\
 -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.dependencies=${DEPENDENCIES} \
 -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.dependencies=${DEPENDENCIES} \
 "
 "
 
 
+echo -e "${BUILDDATE}\n${BUILDREPO}\n${BUILDREV}\n" > $BUILDINFOFILE
+
 echo ""
 echo ""
 echo "Variables for ldflags:"
 echo "Variables for ldflags:"
 echo " Build date: ${BUILDDATE}"
 echo " Build date: ${BUILDDATE}"