mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
chore(CI): Use consistent passing of ARCH to scripts
It's passed to some scripts through the environment variable and to others on as an argument. Make all calls rely on the argument for consistency.
This commit is contained in:
parent
4afaf78c65
commit
98bdf5f36f
|
@ -14,19 +14,19 @@ set -euo pipefail
|
|||
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
--arch) SCRIPT_ARCH=$2; shift 2 ;;
|
||||
--arch) ARCH=$2; shift 2 ;;
|
||||
-h|--help) usage; exit 1 ;;
|
||||
*) echo "Unexpected argument $1"; usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then
|
||||
if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then
|
||||
echo "Unexpected arch $ARCH"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${SCRIPT_ARCH}" == "win64" ]; then
|
||||
if [ "${ARCH}" == "win64" ]; then
|
||||
HOST="x86_64-w64-mingw32"
|
||||
else
|
||||
HOST="i686-w64-mingw32"
|
||||
|
|
|
@ -14,19 +14,19 @@ set -euo pipefail
|
|||
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
--arch) SCRIPT_ARCH=$2; shift 2 ;;
|
||||
--arch) ARCH=$2; shift 2 ;;
|
||||
-h|--help) usage; exit 1 ;;
|
||||
*) echo "Unexpected argument $1"; usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then
|
||||
echo "Unexpected arch $SCRIPT_ARCH"
|
||||
if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then
|
||||
echo "Unexpected arch $ARCH"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${SCRIPT_ARCH}" == "win64" ]; then
|
||||
if [ "${ARCH}" == "win64" ]; then
|
||||
HOST="x86_64-w64-mingw32"
|
||||
else
|
||||
HOST="i686-w64-mingw32"
|
||||
|
|
|
@ -14,21 +14,21 @@ set -euo pipefail
|
|||
|
||||
while (( $# > 0 )); do
|
||||
case $1 in
|
||||
--arch) SCRIPT_ARCH=$2; shift 2 ;;
|
||||
--arch) ARCH=$2; shift 2 ;;
|
||||
-h|--help) usage; exit 1 ;;
|
||||
*) echo "Unexpected argument $1"; usage; exit 1;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "${SCRIPT_ARCH-x}" != "win32" ] && [ "${SCRIPT_ARCH-x}" != "win64" ]; then
|
||||
echo "Unexpected arch $SCRIPT_ARCH"
|
||||
if [ "$ARCH" != "win32" ] && [ "$ARCH" != "win64" ]; then
|
||||
echo "Unexpected arch $ARCH"
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
"$(dirname $0)"/download/download_libexpat.sh
|
||||
|
||||
if [ "${SCRIPT_ARCH}" == "win64" ]; then
|
||||
if [ "${ARCH}" == "win64" ]; then
|
||||
HOST="x86_64-w64-mingw32"
|
||||
else
|
||||
HOST="i686-w64-mingw32"
|
||||
|
|
|
@ -224,21 +224,21 @@ COPY download/download_gmp.sh /build/download/download_gmp.sh
|
|||
COPY build_gmp_windows.sh /build/build_gmp_windows.sh
|
||||
RUN mkdir -p /src/gmp && \
|
||||
cd /src/gmp && \
|
||||
/build/build_gmp_windows.sh && \
|
||||
/build/build_gmp_windows.sh --arch ${SCRIPT_ARCH} && \
|
||||
rm -fr /src/gmp
|
||||
|
||||
COPY download/download_libexpat.sh /build/download/download_libexpat.sh
|
||||
COPY build_libexpat_windows.sh /build/build_libexpat_windows.sh
|
||||
RUN mkdir -p /src/libexpat && \
|
||||
cd /src/libexpat && \
|
||||
/build/build_libexpat_windows.sh && \
|
||||
/build/build_libexpat_windows.sh --arch ${SCRIPT_ARCH} && \
|
||||
rm -fr /src/libexpat
|
||||
|
||||
COPY download/download_gdb.sh /build/download/download_gdb.sh
|
||||
COPY build_gdb_windows.sh /build/build_gdb_windows.sh
|
||||
RUN mkdir -p /src/gdb && \
|
||||
cd /src/gdb && \
|
||||
/build/build_gdb_windows.sh && \
|
||||
/build/build_gdb_windows.sh --arch ${SCRIPT_ARCH} && \
|
||||
rm -fr /src/gdb && \
|
||||
cp /windows/bin/gdb.exe /debug_export/gdb.exe
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user