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

Commit 9740a20

Browse files
committed
add auto-updater script
1 parent 67a13b9 commit 9740a20

File tree

4 files changed

+101
-0
lines changed

4 files changed

+101
-0
lines changed

‎auto-updater/00-clean-env‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
git update-index -q --ignore-submodules --refresh
4+
git diff-index --quiet HEAD -- || {
5+
echo >&2 "Uncommitted changes, please commit or stash them"
6+
exit 1
7+
}

‎auto-updater/20-php-versions‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env bash
2+
3+
tmp=`mktemp`
4+
wget -O$tmp https://s3.amazonaws.com/lang-php/
5+
6+
for php_dist in 5.5 5.6 7.0 7.1; do
7+
echo "Processing PHP version ----> $php_dist"
8+
latest_version=$(
9+
(
10+
xmllint --shell $tmp <<EOF
11+
setns x=http://s3.amazonaws.com/doc/2006-03-01/
12+
xpath //x:Contents/x:Key[starts-with(text(), 'dist-cedar-14-stable/php-$php_dist') and not(contains(text(), '.json'))]/text()
13+
EOF
14+
) \
15+
| perl -ne 'if(/(php-\d+.\d+.\d+)\.tar\.gz/) { print "1ドル\n"; }' \
16+
| sort --version-sort \
17+
| tail -n 1
18+
)
19+
20+
echo "latest version: $latest_version"
21+
sed -e "s/php-$php_dist\.[0-9]\+/$latest_version/" -i support/build/extensions/no-debug-non-zts-*/v8js-bare-*
22+
done
23+
24+
git update-index -q --ignore-submodules --refresh
25+
git diff-index --quiet HEAD -- && {
26+
echo ""
27+
echo "Nothing changed."
28+
exit 0
29+
}
30+
31+
git commit -a -m "Update latest PHP versions"
32+
33+
rm -f $tmp

‎auto-updater/50-update-pecl-php7‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
set -xeo pipefail
3+
4+
tmp=`mktemp`
5+
wget -O$tmp https://pecl.php.net/package/v8js
6+
7+
latest_version=$(
8+
perl -ne 'if(m/v8js-(1\.\d+\.\d+)\.tgz/) { print "1ドル\n"; }' < $tmp \
9+
| sort --version-sort \
10+
| tail -n 1)
11+
echo "Latest PHP V8Js version ----> $latest_version"
12+
13+
for dir in support/build/extensions/no-debug-non-zts-20151012/ support/build/extensions/no-debug-non-zts-20160303/; do
14+
pushd $dir
15+
old_name="$(ls -1 v8js-bare-*)"
16+
old_version="${old_name#v8js-bare-}"
17+
18+
if [ "$old_version" != "$latest_version" ]; then
19+
git mv "v8js-$old_version" "v8js-$latest_version"
20+
git mv "v8js-bare-$old_version" "v8js-bare-$latest_version"
21+
22+
sed -e "s/v8js-bare-$old_version/v8js-bare-$latest_version/g" -i "v8js-$latest_version"
23+
fi
24+
popd
25+
done
26+
27+
git update-index -q --ignore-submodules --refresh
28+
git diff-index --quiet HEAD -- && {
29+
echo ""
30+
echo "Nothing changed."
31+
exit 0
32+
}
33+
34+
git commit -a -m "Update latest PECL v8js versions (php7 branch)"
35+
36+
rm -f $tmp

‎auto-updater/99-ship-it‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
stack=1ドル; shift
3+
4+
set -xeo pipefail
5+
6+
docker build --tag heroku-php-build-$stack --file $(pwd)/support/build/_docker/$stack.Dockerfile .
7+
8+
dokku_run() {
9+
docker run --env-file=env-file -e S3_PREFIX=dist-$stack-develop/ -e UPSTREAM_S3_PREFIX=dist-$stack-stable/ -it heroku-php-build-$stack $*
10+
}
11+
12+
shipit() {
13+
dokku_run support/build/_util/deploy.sh --overwrite $*
14+
}
15+
16+
shipit libraries/v8
17+
18+
19+
for dir in no-debug-non-zts-20160303/; do
20+
shipit `cd support/build/; ls -1 extensions/$dir/v8js-bare-1.*`
21+
shipit `cd support/build/; ls -1 extensions/$dir/v8js-1.*`
22+
done
23+
24+
dokku_run support/build/_util/mkrepo.sh --upload
25+
dokku_run support/build/_util/sync.sh heroku-v8js dist-$stack-stable/

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /