diff --git a/.travis.yml b/.travis.yml
index 7138b23354..bef3a69ad7 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,6 @@
language: generic
sudo: false
+dist: xenial
branches:
except:
- ___TGS3TempBranch
@@ -14,6 +15,7 @@ matrix:
packages:
- python3
- python3-pip
+ - python3-setuptools
cache:
directories:
- tgui/node_modules
@@ -43,7 +45,8 @@ matrix:
- gcc-multilib
- g++-7
- g++-7-multilib
- - libmariadbclient-dev:i386
+ - libmariadb-client-lgpl-dev:i386
+ - libmariadbd-dev
cache:
directories:
- $HOME/.cargo
diff --git a/tools/ss13_genchangelog.py b/tools/ss13_genchangelog.py
index 5c77063e96..e97bef7684 100644
--- a/tools/ss13_genchangelog.py
+++ b/tools/ss13_genchangelog.py
@@ -74,9 +74,9 @@ failed_cache_read = True
if os.path.isfile(changelog_cache):
try:
with open(changelog_cache,encoding='utf-8') as f:
- (_, all_changelog_entries) = yaml.load_all(f)
+ (_, all_changelog_entries) = yaml.load_all(f, Loader=yaml.SafeLoader)
failed_cache_read = False
-
+
# Convert old timestamps to newer format.
new_entries = {}
for _date in all_changelog_entries.keys():
@@ -92,10 +92,10 @@ if os.path.isfile(changelog_cache):
except Exception as e:
print("Failed to read cache:")
print(e, file=sys.stderr)
-
-if args.dryRun:
+
+if args.dryRun:
changelog_cache = os.path.join(args.ymlDir, '.dry_changelog.yml')
-
+
if failed_cache_read and os.path.isfile(args.targetFile):
from bs4 import BeautifulSoup
from bs4.element import NavigableString
@@ -111,7 +111,7 @@ if failed_cache_read and os.path.isfile(args.targetFile):
if author.endswith('updated:'):
author = author[:-8]
author = author.strip()
-
+
# Find
ulT = authorT.next_sibling
while(ulT.name != 'ul'):
@@ -124,14 +124,14 @@ if failed_cache_read and os.path.isfile(args.targetFile):
newdat = {changeT['class'][0] + '': val + ''}
if newdat not in changes:
changes += [newdat]
-
+
if len(changes) > 0:
entry[author] = changes
if date in all_changelog_entries:
all_changelog_entries[date].update(entry)
else:
all_changelog_entries[date] = entry
-
+
del_after = []
print('Reading changelogs...')
for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")):
@@ -142,7 +142,7 @@ for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")):
print(' Reading {}...'.format(fileName))
cl = {}
with open(fileName, 'r',encoding='utf-8') as f:
- cl = yaml.load(f)
+ cl = yaml.load(f, Loader=yaml.SafeLoader)
f.close()
if today not in all_changelog_entries:
all_changelog_entries[today] = {}
@@ -156,23 +156,23 @@ for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")):
print(' {0}: Invalid prefix {1}'.format(fileName, change_type), file=sys.stderr)
author_entries += [change]
new += 1
- all_changelog_entries[today][cl['author']] = author_entries
+ all_changelog_entries[today][cl['author']] = author_entries
if new > 0:
print(' Added {0} new changelog entries.'.format(new))
-
+
if cl.get('delete-after', False):
if os.path.isfile(fileName):
if args.dryRun:
print(' Would delete {0} (delete-after set)...'.format(fileName))
else:
del_after += [fileName]
-
+
if args.dryRun: continue
-
+
cl['changes'] = []
with open(fileName, 'w', encoding='utf-8') as f:
- yaml.dump(cl, f, default_flow_style=False)
-
+ yaml.dump(cl, f, default_flow_style=False)
+
targetDir = os.path.dirname(args.targetFile)
with open(args.targetFile.replace('.htm', '.dry.htm') if args.dryRun else args.targetFile, 'w', encoding='utf-8') as changelog:
@@ -195,18 +195,18 @@ with open(args.targetFile.replace('.htm', '.dry.htm') if args.dryRun else args.t
for (css_class, change) in (dictToTuples(e)[0] for e in all_changelog_entries[_date][author]):
if change in changes_added: continue
write_entry = True
- changes_added += [change]
+ changes_added += [change]
author_htm += '\t\t\t\t- {change}
\n'.format(css_class=css_class, change=change.strip())
author_htm += '\t\t\t
\n'
if len(changes_added) > 0:
entry_htm += author_htm
if write_entry:
changelog.write(entry_htm)
-
+
with open(os.path.join(targetDir, 'templates', 'footer.html'), 'r', encoding='utf-8') as h:
for line in h:
changelog.write(line)
-
+
with open(changelog_cache, 'w') as f:
cache_head = 'DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.'
diff --git a/tools/travis/build_dependencies.sh b/tools/travis/build_dependencies.sh
index 9e594733ea..2c24bdbaaf 100755
--- a/tools/travis/build_dependencies.sh
+++ b/tools/travis/build_dependencies.sh
@@ -41,19 +41,10 @@ if [ $BUILD_TOOLS = false ] && [ $BUILD_TESTING = false ]; then
echo "Setting up MariaDB."
rm -rf "$HOME/MariaDB"
mkdir -p "$HOME/MariaDB"
- wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mariadb-client-lgpl/libmariadb2_2.0.0-1_i386.deb
- dpkg -x libmariadb2_2.0.0-1_i386.deb /tmp/extract
- rm libmariadb2_2.0.0-1_i386.deb
- mv /tmp/extract/usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/
- ln -s $HOME/MariaDB/libmariadb.so.2 $HOME/MariaDB/libmariadb.so
- rm -rf /tmp/extract
-
- wget http://mirrors.kernel.org/ubuntu/pool/universe/m/mariadb-connector-c/libmariadb-dev_2.3.3-1_i386.deb
- dpkg -x libmariadb-dev_2.3.3-1_i386.deb /tmp/extract
- rm libmariadb-dev_2.3.3-1_i386.deb
- mv /tmp/extract/usr/include $HOME/MariaDB/
- #fuck what is this even?
- mv $HOME/MariaDB/include/mariadb $HOME/MariaDB/include/mysql
+ mkdir -p "$HOME/MariaDB/include"
+ cp /usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/
+ ln -s $HOME/MariaDB/libmariadb.so.2 $HOME/MariaDB/libmariadb.so
+ cp -r /usr/include/mariadb $HOME/MariaDB/include/
fi
cd artifacts
diff --git a/tools/travis/install_build_tools.sh b/tools/travis/install_build_tools.sh
index 9dd73f854c..0ea2a605ab 100755
--- a/tools/travis/install_build_tools.sh
+++ b/tools/travis/install_build_tools.sh
@@ -4,9 +4,8 @@ set -e
source dependencies.sh
if [ "$BUILD_TOOLS" = true ]; then
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $NODE_VERSION
- pip3 install --user PyYaml -q
- pip3 install --user beautifulsoup4 -q
+ source ~/.nvm/nvm.sh
+ nvm install $NODE_VERSION
+ pip3 install --user PyYaml
+ pip3 install --user beautifulsoup4
fi;
-
-