Skip to content

Commit 082a99b

Browse files
committed
Added options for build from git and build without downloads. You can set environment variables: GIT_BRANCH, GIT_PATH, NOLOAD_SRC
1 parent edb9d2e commit 082a99b

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

build/helpers/postgres.cmd

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,34 @@ IF EXIST %DOWNLOADS_DIR%\%DEPS_ZIP% (
1111

1212
:BUILD_ALL
1313

14+
IF NOT "%NOLOAD_SRC%"=="" (
15+
CD /D %BUILD_DIR%\postgresql\*%PGVER%* || GOTO :ERROR
16+
GOTO :NOLOAD
17+
)
18+
19+
1420
:BUILD_POSTGRESQL
1521
TITLE Building PostgreSQL...
1622
CD /D %DOWNLOADS_DIR%
23+
IF "%GIT_PATH%"=="" (
24+
SET GIT_PATH=https://git.postgrespro.ru/pgpro-dev/postgrespro.git
25+
)
26+
IF NOT "%GIT_BRANCH%"=="" (
27+
rm -rf %BUILD_DIR%\postgresql
28+
MKDIR %BUILD_DIR%\postgresql
29+
MKDIR %BUILD_DIR%\postgresql\postgresql-%PGVER%
30+
git clone -b %GIT_BRANCH% %GIT_PATH% %BUILD_DIR%\postgresql\postgresql-%PGVER%
31+
CD /D %BUILD_DIR%\postgresql\*%PGVER%* || GOTO :ERROR
32+
33+
GOTO :NOTAR
34+
)
1735
wget --no-check-certificate %PGURL% -O postgresql-%PGVER%.tar.bz2 || GOTO :ERROR
1836
rm -rf %BUILD_DIR%\postgresql
1937
MKDIR %BUILD_DIR%\postgresql
2038
tar xf postgresql-%PGVER%.tar.bz2 -C %BUILD_UDIR%/postgresql
2139
CD /D %BUILD_DIR%\postgresql\*%PGVER%*
2240

41+
:NOTAR
2342
IF %ONE_C% == YES (
2443
IF %HAVE_PGURL% == 1 SET PGTARNAME=postgrespro-1c
2544
IF NOT EXIST %ROOT%\patches\postgresql\%PG_MAJOR_VERSION%\series.for1c GOTO :DONE_1C_PATCH
@@ -84,7 +103,9 @@ SET DEPENDENCIES_BIN_DIR=%DEPENDENCIES_BIN_DIR:\=/%
84103
cp -va %DEPENDENCIES_BIN_DIR%/icu/include/* src\include\ || GOTO :ERROR
85104
cp -va %DEPENDENCIES_BIN_DIR%/icu/lib/* . || GOTO :ERROR
86105

87-
SET PERL5LIB=%PERL64_PATH%\lib;src\tools\msvc;.
106+
:NOLOAD
107+
IF %ARCH% == X86 SET PERL5LIB=%PERL32_PATH%\lib;src\tools\msvc;.
108+
IF %ARCH% == X64 SET PERL5LIB=%PERL64_PATH%\lib;src\tools\msvc;.
88109

89110
%PERL_EXE% src\tools\msvc\build.pl || GOTO :ERROR
90111

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy