Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit26b74c6

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 parentaf3105f commit26b74c6

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

‎build/helpers/postgres.cmd

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,35 @@ IF EXIST %DOWNLOADS_DIR%\%DEPS_ZIP% (
1111

1212
:BUILD_ALL
1313

14+
IFNOT"%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+
SETGIT_PATH=https://git.postgrespro.ru/pgpro-dev/postgrespro.git
25+
)
26+
IFNOT"%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+
)
35+
1736
wget --no-check-certificate%PGURL% -O postgresql-%PGVER%.tar.bz2||GOTO :ERROR
1837
rm -rf%BUILD_DIR%\postgresql
1938
MKDIR%BUILD_DIR%\postgresql
2039
tar xf postgres*-%PGVER%.tar.bz2 -C%BUILD_UDIR%/postgresql||GOTO :ERROR
2140
CD /D%BUILD_DIR%\postgresql\*%PGVER%*||GOTO :ERROR
2241

42+
:NOTAR
2343
IF%ONE_C%== YES (
2444
cp -va%ROOT%/patches/postgresql/%PGVER%/series.for1c .
2545
IFNOTEXIST series.for1cGOTO :ERROR
@@ -30,6 +50,7 @@ IF %ONE_C% == YES (
3050
)
3151
)
3252

53+
3354
if"%PRODUCT_NAME%"=="PostgreSQL" (
3455
cp -va%ROOT%/patches/postgresql/%PG_MAJOR_VERSION%/series .
3556
IFNOTEXIST seriesGOTO :DONE_POSTGRESQL_PATCH
@@ -85,12 +106,14 @@ rem cp -va %DEPENDENCIES_BIN_DIR%/icu/include/* src\include\ || GOTO :ERROR
85106
rem cp -va %DEPENDENCIES_BIN_DIR%/icu/lib/* .|| GOTO :ERROR
86107

87108
)
88-
109+
:NOLOAD
89110
IF%ARCH%== X86SETPERL5LIB=%PERL32_PATH%\lib;src\tools\msvc
90111
IF%ARCH%== X64SETPERL5LIB=%PERL64_PATH%\lib;src\tools\msvc
91112

92-
%PERL_EXE% src\tools\msvc\build.pl||GOTO :ERROR
93-
113+
CD /D%BUILD_DIR%\postgresql\*%PGVER%*\src\tools\msvc||GOTO :ERROR
114+
rem %PERL_EXE% src\tools\msvc\build.pl|| GOTO :ERROR
115+
%PERL_EXE% build.pl||GOTO :ERROR
116+
CD /D%BUILD_DIR%\postgresql\*%PGVER%*||GOTO :ERROR
94117
IFEXIST contrib\pg_probackup\gen_probackup_project.pl%PERL_EXE% contrib\pg_probackup\gen_probackup_project.pl||GOTO :ERROR
95118

96119
rm -rf%BUILD_DIR%\distr_%ARCH%_%PGVER%\postgresql

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp