aboutsummaryrefslogtreecommitdiff
path: root/contrib/check-prebuilt
blob: a85dcd264b4169cae1b897c02e4d60309e5bc3d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env python3

import os
import sys

failed = False
contrib = os.path.abspath(os.path.dirname(__file__))

auditor_spa_ver_lock = open(contrib + "/" + "auditor-spa.lock").read().strip()
auditor_spa_ver_prebuilt = open(contrib + "/" + "wallet-core/auditor-backoffice/version.txt").read().strip()

aml_spa_ver_lock = open(contrib + "/" + "aml-spa.lock").read().strip()
aml_spa_ver_prebuilt = open(contrib + "/" + "wallet-core/aml-backoffice/version.txt").read().strip()

kyc_spa_ver_lock = open(contrib + "/" + "kyc-spa.lock").read().strip()
kyc_spa_ver_prebuilt = open(contrib + "/" + "wallet-core/kyc/version.txt").read().strip()

if aml_spa_ver_lock != aml_spa_ver_prebuilt:
    print("AML SPA version mismatch (contrib/aml-spa.lock)")
    print("lockfile has version", aml_spa_ver_lock)
    print("prebuilt has version", aml_spa_ver_prebuilt)
    failed = True

if kyc_spa_ver_lock != kyc_spa_ver_prebuilt:
    print("KYC SPA version mismatch (contrib/kyc-spa.lock)")
    print("lockfile has version", kyc_spa_ver_lock)
    print("prebuilt has version", kyc_spa_ver_prebuilt)
    failed = True

if auditor_spa_ver_lock != auditor_spa_ver_prebuilt:
    print("auditor SPA version mismatch (contrib/auditor-spa.lock)")
    print("lockfile has version", auditor_spa_ver_lock)
    print("prebuilt has version", auditor_spa_ver_prebuilt)
    failed = True

if failed:
    sys.exit(1)