forked from rirze/authenticator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
authenticator.ps1
41 lines (34 loc) · 868 Bytes
/
authenticator.ps1
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
38
39
40
41
# Check style and PEP compliance for source code
#
Set-Strictmode -version Latest
# Capture the file name of this powershell script
#
$SCRIPTNAME_ = $MyInvocation.InvocationName
$scriptDir_ = $PSScriptRoot
# Set error code
#
$errcode_ = 0
# Pick up the verification functions
#
. "$scriptDir_\dev\venv\check-functions.src.ps1"
# Check that we are running in a Python 3.5 virtual environment
#
. "$scriptDir_\dev\venv\check-active-venv.src.ps1"
If (0 -ne $errcode_) {
Exit
}
# Check that we have the needed packages
#
# We need: flake8, pep8-naming, pep257
#
. "$scriptDir_\dev\venv\check-dependencies.src.ps1"
If (0 -ne $errcode_) {
Exit
}
# Run this from the root directory of the project
#
$allArgs_ = $PsBoundParameters.Values + $args
$env:PYTHONPATH="$pwd\src"
$rcmd = "python"
$rargs = $( "-m authenticator.cli" -Split " " ) + $allArgs_
& $rcmd $rargs