Skip to content

Commit 8121cb5

Browse files
committed
Pass explicit PHP version string to mkdist.php
1 parent f052e99 commit 8121cb5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

win32/build/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ build-dist: $(BUILD_DIR)\deplister.exe
186186
-del /f /q $(BUILD_DIR)\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
187187
-del /f /q $(BUILD_DIR)\php-debug-pack-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
188188
-del /f /q $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip
189-
$(PHP_SDK_PHP_CMD) -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php "$(BUILD_DIR)" "$(PHP_BUILD)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES)" "$(SNAPSHOT_TEMPLATE)"
189+
$(PHP_SDK_PHP_CMD) -d date.timezone=UTC -n -dphar.readonly=0 win32/build/mkdist.php "$(PHP_VERSION_STRING)" "$(BUILD_DIR)" "$(PHP_BUILD)" "$(PHPDLL)" "$(SAPI_TARGETS)" "$(EXT_TARGETS) $(PHP_EXTRA_DIST_FILES)" "$(PECL_TARGETS) $(PECL_EXTRA_DIST_FILES)" "$(SNAPSHOT_TEMPLATE)"
190190
cd $(BUILD_DIR)\php-$(PHP_VERSION_STRING)
191191
-$(ZIP) -9 -q -r ..\php-$(PHP_VERSION_STRING)$(PHP_ZTS_ARCHIVE_POSTFIX)-Win32-$(PHP_COMPILER_SHORT)-$(PHP_ARCHITECTURE).zip .
192192
cd $(BUILD_DIR)\pecl-$(PHP_VERSION_STRING)

win32/build/mkdist.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<?php # $Id$
22
/* piece together a windows binary distro */
33

4-
$build_dir = $argv[1];
5-
$php_build_dir = $argv[2];
6-
$phpdll = $argv[3];
7-
$sapi_targets = explode(" ", $argv[4]);
8-
$ext_targets = explode(" ", $argv[5]);
9-
$pecl_targets = explode(" ", $argv[6]);
10-
$snapshot_template = $argv[7];
4+
$php_version = $argv[1];
5+
$build_dir = $argv[2];
6+
$php_build_dir = $argv[3];
7+
$phpdll = $argv[4];
8+
$sapi_targets = explode(" ", $argv[5]);
9+
$ext_targets = explode(" ", $argv[6]);
10+
$pecl_targets = explode(" ", $argv[7]);
11+
$snapshot_template = $argv[8];
1112

1213
$is_debug = preg_match("/^debug/i", $build_dir);
1314

1415
echo "Making dist for $build_dir\n";
1516

16-
$dist_dir = $build_dir . "/php-" . phpversion();
17-
$test_dir = $build_dir . "/php-test-pack-" . phpversion();
18-
$pecl_dir = $build_dir . "/pecl-" . phpversion();
17+
$dist_dir = $build_dir . "/php-" . $php_version;
18+
$test_dir = $build_dir . "/php-test-pack-" . $php_version;
19+
$pecl_dir = $build_dir . "/pecl-" . $php_version;
1920

2021
@mkdir($dist_dir);
2122
@mkdir("$dist_dir/ext");
@@ -258,12 +259,11 @@ function extract_file_from_tarball($pkg, $filename, $dest_dir) /* {{{ */
258259
$branch = "HEAD"; // TODO - determine this from SVN branche name
259260
$fp = fopen("$dist_dir/snapshot.txt", "w");
260261
$now = date("r");
261-
$version = phpversion();
262262
fwrite($fp, <<<EOT
263263
This snapshot was automatically generated on
264264
$now
265265
266-
Version: $version
266+
Version: $php_version
267267
Branch: $branch
268268
Build: $build_dir
269269

0 commit comments

Comments
 (0)