Skip to content

Commit 57d46d5

Browse files
committed
unify/generate tmp_dir
1 parent 277b122 commit 57d46d5

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.github/scripts/download-bundled/boost-context.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
set -ex
33
cd "$(dirname "$0")/../../.."
44

5+
tmp_dir=/tmp/php-src-download-bundled/boost-context
6+
rm -rf "$tmp_dir"
7+
58
revision=refs/tags/boost-1.86.0
69

7-
git clone --depth 1 --revision="$revision" https://github.com/boostorg/context.git /tmp/php-src-bundled/boost-context
10+
git clone --depth 1 --revision="$revision" https://github.com/boostorg/context.git "$tmp_dir"
811

912
rm -rf Zend/asm
10-
cp -R /tmp/php-src-bundled/boost-context/src/asm Zend/asm
13+
cp -R "$tmp_dir"/src/asm Zend/asm
1114

1215
cd Zend/asm
1316

.github/scripts/download-bundled/make-workflow-file.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,14 @@ protected function makeDownloadScriptHeader(Bundle $bundle): void
167167
set -ex
168168
cd "$(dirname "$0")/../../.."
169169
170+
tmp_dir=%tmp_dir%
171+
rm -rf "$tmp_dir"
172+
170173

171174
EOD;
175+
176+
$header = str_replace('%tmp_dir%', '/tmp/php-src-download-bundled/' . $bundle->getNameForPath(), $header);
177+
172178
if (!str_starts_with($content, $header)) {
173179
$content = $header . $content;
174180
}

.github/scripts/download-bundled/pcre2.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@
22
set -ex
33
cd "$(dirname "$0")/../../.."
44

5+
tmp_dir=/tmp/php-src-download-bundled/pcre2
6+
rm -rf "$tmp_dir"
7+
58
revision=refs/tags/pcre2-10.44
69

7-
git clone --depth 1 --recurse-submodules --revision="$revision" https://github.com/PCRE2Project/pcre2.git /tmp/php-src-bundled/pcre2
10+
git clone --depth 1 --recurse-submodules --revision="$revision" https://github.com/PCRE2Project/pcre2.git "$tmp_dir"
811

912
rm -rf ext/pcre/pcre2lib
10-
cp -R /tmp/php-src-bundled/pcre2/src ext/pcre/pcre2lib
13+
cp -R "$tmp_dir"/src ext/pcre/pcre2lib
1114

1215
cd ext/pcre/pcre2lib
1316

0 commit comments

Comments
 (0)