Skip to content

Commit 5ee9f37

Browse files
committed
Add config.sh for default registry and code signing
It is gitignore'd so users can put their private details there (path to keystore and most importantly password) without having to version them in git.
1 parent e583fcb commit 5ee9f37

File tree

4 files changed

+50
-3
lines changed

4 files changed

+50
-3
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Private signing key
1+
# User-specific configuration and signing key
2+
config.sh
23
*.pkcs12
34

45
# Generated by build scripts

build-release.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,21 @@ if [ -z $1 ]; then
99
exit 1
1010
fi
1111

12+
# For signing keystore and password.
13+
source ./config.sh
14+
15+
can_sign=0
16+
if [ ! -z "${SIGN_KEYSTORE}" ] && [ ! -z "${SIGN_PASSWORD}" ]; then
17+
can_sign=1
18+
else
19+
echo "Disabling binary signing as config.sh does not define the required data."
20+
fi
21+
1222
function sign {
13-
./osslsigncode -pkcs12 REDACTED.pkcs12 -pass "REDACTED" -n "Godot Game Engine" -i "https://godotengine.org" -t http://timestamp.comodoca.com -in $1 -out $1-signed
23+
if [ $can_sign == 0 ]; then
24+
return
25+
fi
26+
./osslsigncode -pkcs12 ${SIGN_KEYSTORE} -pass "${SIGN_PASSWORD}" -n "${SIGN_NAME}" -i "${SIGN_URL}" -t http://timestamp.comodoca.com -in $1 -out $1-signed
1427
mv $1-signed $1
1528
}
1629

build.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,14 @@ set -e
44

55
OPTIND=1
66

7-
registry="registry.prehensile-tales.com"
7+
# For default registry.
8+
if [ ! -e config.sh ]; then
9+
echo "No config.sh, copying default values from config.sh.in."
10+
cp config.sh.in config.sh
11+
fi
12+
source ./config.sh
13+
14+
registry="${REGISTRY}"
815
username=""
916
password=""
1017
godot_version=""

config.sh.in

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Configuration file for user-specific details.
4+
# This file is gitignore'd and will be sourced by build scripts.
5+
6+
# Registry for build containers.
7+
# The default registry is the one used for official Godot builds.
8+
# Note that some of its images are private and only accessible to selected
9+
# contributors.
10+
# You can build your own registry with scripts at
11+
# https://github.com/godotengine/build-containers
12+
export REGISTRY="registry.prehensile-tales.com"
13+
14+
# Set up your own signing keystore and relevant details below.
15+
# If you do not fill all SIGN_* fields, signing will be skipped.
16+
17+
# Path to pkcs12 archive.
18+
export SIGN_KEYSTORE=""
19+
20+
# Password for the private key.
21+
export SIGN_PASSWORD=""
22+
23+
# Name and URL of the signed application.
24+
# Use your own when making a thirdparty build.
25+
export SIGN_NAME=""
26+
export SIGN_URL=""

0 commit comments

Comments
 (0)