Skip to content

Commit 2dce0a2

Browse files
authored
Merge pull request #172 from devinmatte/docker
Fixing Build Error and Updating Version
2 parents 7896361 + ec0e445 commit 2dce0a2

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ADD requirements.txt /opt/conditional
88
WORKDIR /opt/conditional
99

1010
RUN apt-get -yq update && \
11-
apt-get -yq install libsasl2-dev python-dev libldap2-dev libssl-dev && \
11+
apt-get -yq install libsasl2-dev libldap2-dev libssl-dev && \
1212
pip install -r requirements.txt && \
1313
apt-get -yq clean all
1414

conditional/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from ._version import __version__
33

44
import os
5-
import subprocess
65
from datetime import datetime
76

87
from csh_ldap import CSHLDAP
@@ -23,10 +22,7 @@
2322

2423
app.config["SQLALCHEMY_TRACK_MODIFICATIONS"] = False
2524

26-
app.config["GIT_REVISION"] = subprocess.check_output(['git',
27-
'rev-parse',
28-
'--short',
29-
'HEAD']).decode('utf-8').rstrip()
25+
app.config["VERSION"] = __version__
3026

3127
db = SQLAlchemy(app)
3228
migrate = Migrate(app, db)

conditional/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.6.1"
1+
__version__ = "1.7.0"

conditional/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import secrets
12
from os import environ as env
3+
24
from conditional import __version__
35

46
# Flask config
57
DEBUG = True if env.get("CONDITIONAL_DEBUG", "false").lower() == "true" else False
68
HOST_NAME = env.get("CONDITIONAL_HOST_NAME", "conditional.csh.rit.edu")
9+
SERVER_NAME = env.get('CONDITIONAL_SERVER_NAME', 'conditional.csh.rit.edu')
710
APP_NAME = "conditional"
811
IP = env.get("CONDITIONAL_IP", "0.0.0.0")
912
PORT = env.get("CONDITIONAL_PORT", 6969)
@@ -31,5 +34,8 @@
3134
'post_logout_redirect_uris': [env.get("CONDITIONAL_OIDC_CLIENT_LOGOUT", "http://0.0.0.0:6969/logout")]
3235
}
3336

37+
# Openshift secret
38+
SECRET_KEY = env.get("CONDITIONAL_SECRET_KEY", default=''.join(secrets.token_hex(16)))
39+
3440
# General config
3541
DUES_PER_SEMESTER = env.get("CONDITIONAL_DUES_PER_SEMESTER", 80)

conditional/templates/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ <h3>Evaluations underway:</h3>
3636
{% endif %}
3737

3838
<footer>
39-
<a class="footer-version" href="https://github.com/ComputerScienceHouse/conditional/tree/{{config["GIT_REVISION"]}}">Conditional ({{config["GIT_REVISION"]}})</a>
39+
<a class="footer-version" href="https://github.com/ComputerScienceHouse/conditional/tree/v{{config["VERSION"]}}">Conditional (v{{config["VERSION"]}})</a>
4040
</footer>
4141
<script src="/static/js/app.js"></script>
4242
</body>

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "conditional",
3-
"version": "1.6.1",
3+
"version": "1.7.0",
44
"description": "CSH Re-evaluation (MEGA_EVALS RE:RE:LOADED)",
55
"license": "MIT",
66
"homepage": "http://csh.rit.edu/",
@@ -26,7 +26,7 @@
2626
},
2727
"dependencies": {
2828
"bootstrap": "^3.3.6",
29-
"bootstrap-material-datetimepicker": "^2.7.3",
29+
"bootstrap-material-datetimepicker": "https://github.com/T00rk/bootstrap-material-datetimepicker.git#gh-pages",
3030
"bootstrap-sass": "^3.3.6",
3131
"bootstrap-sweetalert": "^1.0.1",
3232
"csh-material-bootstrap": "1.0.0",

0 commit comments

Comments
 (0)