Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit 5a68fa1

Browse files
committed
Splitted deployment between signed and unsigned PHAR files
1 parent e5478cd commit 5a68fa1

File tree

3 files changed

+63
-9
lines changed

3 files changed

+63
-9
lines changed

bin/deploy.sh

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,53 @@ git fetch deploy
1919
# Get Box and build
2020
wget https://github.com/box-project/box2/releases/download/2.7.0/box-2.7.0.phar -O ./bin/box.phar
2121
chmod a+x ./bin/box.phar
22-
./bin/box.phar build -vv
2322

24-
# To allow checkout gh-pages branch
23+
# Unsigned build
24+
./bin/box.phar build -vv
2525
mv jupyter-php-installer.phar jupyter-php-installer.phar.tmp
26-
mv jupyter-php-installer.phar.pubkey jupyter-php-installer.phar.pubkey.tmp
26+
27+
# Signed build
28+
./bin/box.phar build -c box.signed.json -vv
29+
mv jupyter-php-installer.phar jupyter-php-installer.signed.phar.tmp
30+
mv jupyter-php-installer.phar.pubkey jupyter-php-installer.signed.phar.pubkey.tmp
2731

2832
# Checkout gh-pages and add PHAR file and version:
2933
git checkout -b gh-pages deploy/gh-pages
3034

35+
# Moving unsigned build
3136
mv jupyter-php-installer.phar.tmp dist/jupyter-php-installer.phar
32-
mv jupyter-php-installer.phar.pubkey.tmp dist/jupyter-php-installer.phar.pubkey
37+
cd dist && md5sum jupyter-php-installer.phar > jupyter-php-installer.phar.md5 && cd ..
38+
cd dist && sha1sum jupyter-php-installer.phar > jupyter-php-installer.phar.sha1 && cd ..
39+
cd dist && sha256sum jupyter-php-installer.phar > jupyter-php-installer.phar.sha256 && cd ..
40+
cd dist && sha512sum jupyter-php-installer.phar > jupyter-php-installer.phar.sha512 && cd ..
41+
42+
# Moving signed build
43+
mv jupyter-php-installer.signed.phar.tmp dist/jupyter-php-installer.signed.phar
44+
mv jupyter-php-installer.signed.phar.pubkey.tmp dist/jupyter-php-installer.signed.phar.pubkey
45+
cd dist && md5sum jupyter-php-installer.signed.phar > jupyter-php-installer.signed.phar.md5 && cd ..
46+
cd dist && sha1sum jupyter-php-installer.signed.phar > jupyter-php-installer.signed.phar.sha1 && cd ..
47+
cd dist && sha256sum jupyter-php-installer.signed.phar > jupyter-php-installer.signed.phar.sha256 && cd ..
48+
cd dist && sha512sum jupyter-php-installer.signed.phar > jupyter-php-installer.signed.phar.sha512 && cd ..
49+
cd dist && md5sum jupyter-php-installer.signed.phar.pubkey > jupyter-php-installer.signed.phar.pubkey.md5 && cd ..
50+
cd dist && sha1sum jupyter-php-installer.signed.phar.pubkey > jupyter-php-installer.signed.phar.pubkey.sha1 && cd ..
51+
cd dist && sha256sum jupyter-php-installer.signed.phar.pubkey > jupyter-php-installer.signed.phar.pubkey.sha256 && cd ..
52+
cd dist && sha512sum jupyter-php-installer.signed.phar.pubkey > jupyter-php-installer.signed.phar.pubkey.sha512 && cd ..
53+
54+
# Adding phar files
55+
git add dist/jupyter-php-installer.phar dist/jupyter-php-installer.signed.phar
56+
57+
# Adding public keys
58+
git add dist/jupyter-php-installer.signed.phar.pubkey
59+
60+
# Adding "unsigned" checksums
61+
git add dist/jupyter-php-installer.phar.md5 dist/jupyter-php-installer.phar.sha1 dist/jupyter-php-installer.phar.sha256 dist/jupyter-php-installer.phar.sha512
62+
63+
# Adding "signed" checksums
64+
git add dist/jupyter-php-installer.signed.phar.md5 dist/jupyter-php-installer.signed.phar.sha1 dist/jupyter-php-installer.signed.phar.sha256 dist/jupyter-php-installer.signed.phar.sha512
65+
66+
# Adding public key checksums
67+
git add dist/jupyter-php-installer.signed.phar.pubkey.md5 dist/jupyter-php-installer.signed.phar.pubkey.sha1 dist/jupyter-php-installer.signed.phar.pubkey.sha256 dist/jupyter-php-installer.signed.phar.pubkey.sha512
3368

34-
sha1sum dist/jupyter-php-installer.phar > dist/jupyter-php-installer.phar.version
35-
git add dist/jupyter-php-installer.phar dist/jupyter-php-installer.phar.version dist/jupyter-php-installer.phar.pubkey
3669

3770
# Commit and push:
3871
git commit -m 'Rebuilt phar'

box.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"alias": "jupyter-php-installer.phar",
33
"chmod": "0755",
4-
"algorithm": "OPENSSL",
54
"compression": "GZ",
65
"directories": ["src"],
76
"files": [
@@ -18,6 +17,5 @@
1817
"git-version": "package_version",
1918
"main": "src/EntryPoint/main.php",
2019
"output": "jupyter-php-installer.phar",
21-
"stub": true,
22-
"key": ".travis/phar_private.key"
20+
"stub": true
2321
}

box.signed.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"alias": "jupyter-php-installer.phar",
3+
"chmod": "0755",
4+
"algorithm": "OPENSSL",
5+
"compression": "GZ",
6+
"directories": ["src"],
7+
"files": [
8+
"LICENSE",
9+
"README.md"
10+
],
11+
"finder": [
12+
{
13+
"name": "*.php",
14+
"exclude": ["Tests", "Tester"],
15+
"in": "vendor"
16+
}
17+
],
18+
"git-version": "package_version",
19+
"main": "src/EntryPoint/main.php",
20+
"output": "jupyter-php-installer.phar",
21+
"stub": true,
22+
"key": ".travis/phar_private.key"
23+
}

0 commit comments

Comments
 (0)