Просмотр исходного кода

Emit build info files in Android and iOS build scripts

Rod Hynes 6 лет назад
Родитель
Сommit
d37b577482
2 измененных файлов с 6 добавлено и 0 удалено
  1. 3 0
      MobileLibrary/Android/make.bash
  2. 3 0
      MobileLibrary/iOS/build-psiphon-framework.sh

+ 3 - 0
MobileLibrary/Android/make.bash

@@ -20,6 +20,7 @@ if [ $? != 0 ]; then
   exit $?
 fi
 
+BUILDINFOFILE="psiphon-tunnel-core_buildinfo.txt"
 BUILDDATE=$(date --iso-8601=seconds)
 BUILDREPO=$(git config --get remote.origin.url)
 BUILDREV=$(git rev-parse --short HEAD)
@@ -46,6 +47,8 @@ LDFLAGS="\
 -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 " Build date: ${BUILDDATE}"
 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
 cd ${TUNNEL_CORE_SRC_DIR}
 
+BUILDINFOFILE="${BASE_DIR}/psiphon-tunnel-core_buildinfo.txt"
 BUILDDATE=$(date +%Y-%m-%dT%H:%M:%S%z)
 BUILDREPO=$(git config --get remote.origin.url)
 BUILDREV=$(git rev-parse --short HEAD)
@@ -147,6 +148,8 @@ LDFLAGS="\
 -X github.com/Psiphon-Labs/psiphon-tunnel-core/psiphon/common/buildinfo.dependencies=${DEPENDENCIES} \
 "
 
+echo -e "${BUILDDATE}\n${BUILDREPO}\n${BUILDREV}\n" > $BUILDINFOFILE
+
 echo ""
 echo "Variables for ldflags:"
 echo " Build date: ${BUILDDATE}"