mirror of
https://github.com/GAM-team/GAM.git
synced 2026-07-03 12:21:35 +00:00
Report GAM type (source, pyinstaller, staticx) with gam version
This commit is contained in:
@@ -250,7 +250,7 @@ script:
|
|||||||
- if [ "$e2e" = true ]; then $gam calendar $gam_user printevents after -0d; fi
|
- if [ "$e2e" = true ]; then $gam calendar $gam_user printevents after -0d; fi
|
||||||
- if [ "$e2e" = true ]; then $gam create vaultmatter name "Travis matter $newbase" description "test matter" collaborators $newuser; fi
|
- if [ "$e2e" = true ]; then $gam create vaultmatter name "Travis matter $newbase" description "test matter" collaborators $newuser; fi
|
||||||
- if [ "$e2e" = true ]; then $gam create vaulthold matter "Travis matter $newbase" name "Travis hold $newbase" corpus mail accounts $newuser; fi
|
- if [ "$e2e" = true ]; then $gam create vaulthold matter "Travis matter $newbase" name "Travis hold $newbase" corpus mail accounts $newuser; fi
|
||||||
- if [ "$e2e" = true ]; then $gam print vaultmatters state open; fi
|
- if [ "$e2e" = true ]; then $gam print vaultmatters matterstate open; fi
|
||||||
- if [ "$e2e" = true ]; then $gam print vaultholds matter "Travis matter $newbase"; fi
|
- if [ "$e2e" = true ]; then $gam print vaultholds matter "Travis matter $newbase"; fi
|
||||||
- if [ "$e2e" = true ]; then $gam create vaultexport matter "Travis matter $newbase" name "Travis export $newbase" corpus mail accounts $newuser; fi
|
- if [ "$e2e" = true ]; then $gam create vaultexport matter "Travis matter $newbase" name "Travis export $newbase" corpus mail accounts $newuser; fi
|
||||||
- if [ "$e2e" = true ]; then $gam print exports matter "Travis matter $newbase" | $gam csv - gam info export id:~~matterId~~ id:~~id~~; fi
|
- if [ "$e2e" = true ]; then $gam print exports matter "Travis matter $newbase" | $gam csv - gam info export id:~~matterId~~ id:~~id~~; fi
|
||||||
|
|||||||
@@ -98,12 +98,15 @@ if platform.system() == 'Linux':
|
|||||||
if os.environ.get('STATICX_PROG_PATH', False):
|
if os.environ.get('STATICX_PROG_PATH', False):
|
||||||
# StaticX static executable
|
# StaticX static executable
|
||||||
GM_Globals[GM_GAM_PATH] = os.path.dirname(os.environ['STATICX_PROG_PATH'])
|
GM_Globals[GM_GAM_PATH] = os.path.dirname(os.environ['STATICX_PROG_PATH'])
|
||||||
|
GM_Globals[GM_GAM_TYPE] = 'staticx'
|
||||||
# Pyinstaller executable
|
# Pyinstaller executable
|
||||||
elif getattr(sys, 'frozen', False):
|
elif getattr(sys, 'frozen', False):
|
||||||
GM_Globals[GM_GAM_PATH] = os.path.dirname(sys.executable)
|
GM_Globals[GM_GAM_PATH] = os.path.dirname(sys.executable)
|
||||||
|
GM_Globals[GM_GAM_TYPE] = 'pyinstaller'
|
||||||
else:
|
else:
|
||||||
# Source code
|
# Source code
|
||||||
GM_Globals[GM_GAM_PATH] = os.path.dirname(os.path.realpath(__file__))
|
GM_Globals[GM_GAM_PATH] = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
GM_Globals[GM_GAM_TYPE] = 'pythonsource'
|
||||||
|
|
||||||
def showUsage():
|
def showUsage():
|
||||||
doGAMVersion(checkForArgs=False)
|
doGAMVersion(checkForArgs=False)
|
||||||
@@ -599,7 +602,7 @@ def doGAMVersion(checkForArgs=True):
|
|||||||
return
|
return
|
||||||
pyversion = platform.python_version()
|
pyversion = platform.python_version()
|
||||||
cpu_bits = struct.calcsize('P') * 8
|
cpu_bits = struct.calcsize('P') * 8
|
||||||
print((f'GAM {gam_version} - {GAM_URL}\n'
|
print((f'GAM {gam_version} - {GAM_URL} - {GM_Globals[GM_GAM_TYPE]}\n'
|
||||||
f'{gam_author}\n'
|
f'{gam_author}\n'
|
||||||
f'Python {pyversion} {cpu_bits}-bit {sys.version_info.releaselevel}\n'
|
f'Python {pyversion} {cpu_bits}-bit {sys.version_info.releaselevel}\n'
|
||||||
f'google-api-python-client {googleapiclient.__version__}\n'
|
f'google-api-python-client {googleapiclient.__version__}\n'
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ else
|
|||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
fi
|
fi
|
||||||
$pip install git+https://github.com/JonathonReinhart/staticx.git@master
|
$pip install staticx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $whereibelong
|
cd $whereibelong
|
||||||
|
|||||||
@@ -725,6 +725,8 @@ GROUP_SETTINGS_BOOLEAN_ATTRIBUTES = set([
|
|||||||
GM_SYSEXITRC = 'sxrc'
|
GM_SYSEXITRC = 'sxrc'
|
||||||
# Path to gam
|
# Path to gam
|
||||||
GM_GAM_PATH = 'gpth'
|
GM_GAM_PATH = 'gpth'
|
||||||
|
# Python source, PyInstaller or StaticX?
|
||||||
|
GM_GAM_TYPE = 'gtyp'
|
||||||
# Are we on Windows?
|
# Are we on Windows?
|
||||||
GM_WINDOWS = 'wndo'
|
GM_WINDOWS = 'wndo'
|
||||||
# Encodings
|
# Encodings
|
||||||
@@ -768,6 +770,7 @@ _FN_OAUTH2_TXT = 'oauth2.txt'
|
|||||||
GM_Globals = {
|
GM_Globals = {
|
||||||
GM_SYSEXITRC: 0,
|
GM_SYSEXITRC: 0,
|
||||||
GM_GAM_PATH: None,
|
GM_GAM_PATH: None,
|
||||||
|
GM_GAM_TYPE: None,
|
||||||
GM_WINDOWS: os.name == 'nt',
|
GM_WINDOWS: os.name == 'nt',
|
||||||
GM_SYS_ENCODING: _DEFAULT_CHARSET,
|
GM_SYS_ENCODING: _DEFAULT_CHARSET,
|
||||||
GM_EXTRA_ARGS_DICT: {'prettyPrint': False},
|
GM_EXTRA_ARGS_DICT: {'prettyPrint': False},
|
||||||
|
|||||||
Reference in New Issue
Block a user