summaryrefslogtreecommitdiff
path: root/branding
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2019-07-09 18:20:10 +0200
committerRuben Pollan <meskio@sindominio.net>2019-08-05 11:46:08 -0400
commitd33a4a041ab5d9e11e127d8a0e18205f97f4cabd (patch)
tree12af59a68733e664896cbd32848310014c8589f6 /branding
parentebe7e3e10485ea69ca5726117c643b8851ba45f9 (diff)
[feat] allow overriding of PROVIDER_CONFIG
Diffstat (limited to 'branding')
-rw-r--r--branding/README.txt17
-rwxr-xr-xbranding/scripts/vendorize.py6
2 files changed, 20 insertions, 3 deletions
diff --git a/branding/README.txt b/branding/README.txt
index 3601524..dea4d76 100644
--- a/branding/README.txt
+++ b/branding/README.txt
@@ -8,14 +8,25 @@ BitmaskVPN for your provider.
Configure
--------------------------------------------------------------------------------
-- Edit the file at 'branding/config/vendor.conf'. Add all the needed variables.
-- Copy your provider CA certificate to 'branding/config/<provider>-ca.crt'
+- Copy or edit the file at 'branding/config/vendor.conf'. Add all the needed variables.
+- Copy your provider CA certificate to the same folder: 'branding/config/<provider>-ca.crt'
- Make sure that the folder 'branding/assets/<provider>' exists. Copy there all the needed assets.
Build
--------------------------------------------------------------------------------
+Some of the following scripts need network access, since they will check
+whether the configuration published by your provider matches what is configured
+before the build.
+
Run:
-PROVIDER=example.org make generate
+PROVIDER=example.org make prepare
+make build
+
+You can also specify a cusom config file:
+
+PROVIDER=example.org PROVIDER_CONFIG make prepare
make build
+
+
diff --git a/branding/scripts/vendorize.py b/branding/scripts/vendorize.py
index c600967..dc19952 100755
--- a/branding/scripts/vendorize.py
+++ b/branding/scripts/vendorize.py
@@ -88,6 +88,12 @@ if __name__ == "__main__":
except IndexError:
bail()
+ env_provider_conf = os.environ.get('PROVIDER_CONFIG')
+ if env_provider_conf:
+ if os.path.isfile(env_provider_conf):
+ print("[+] Overriding provider config per PROVIDER_CONFIG variable")
+ configfile = env_provider_conf
+
if not os.path.isfile(infile):
bail('[!] Cannot find template in {path}'.format(
path=os.path.abspath(infile)))