port "PR to make travis use xenial and to make it work"

This commit is contained in:
Ghommie
2019-06-13 22:18:13 +02:00
parent d5bfe16c78
commit c37c432de6
4 changed files with 43 additions and 44 deletions
+4 -1
View File
@@ -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
+19 -24
View File
@@ -1,21 +1,16 @@
'''
Usage:
$ python ss13_genchangelog.py [--dry-run] html/changelog.html html/changelogs/
ss13_genchangelog.py - Generate changelog from YAML.
Copyright 2013 Rob "N3X15" Nelson <nexis@7chan.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -74,9 +69,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 +87,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 +106,7 @@ if failed_cache_read and os.path.isfile(args.targetFile):
if author.endswith('updated:'):
author = author[:-8]
author = author.strip()
# Find <ul>
ulT = authorT.next_sibling
while(ulT.name != 'ul'):
@@ -124,14 +119,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 +137,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 +151,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 +190,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<li class="{css_class}">{change}</li>\n'.format(css_class=css_class, change=change.strip())
author_htm += '\t\t\t</ul>\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.'
@@ -217,4 +212,4 @@ if len(del_after):
for fileName in del_after:
if os.path.isfile(fileName):
print(' Deleting {0} (delete-after set)...'.format(fileName))
os.remove(fileName)
os.remove(fileName)
+15 -13
View File
@@ -4,6 +4,17 @@ set -e
source dependencies.sh
#ensure the Dockerfile version matches the dependencies.sh version
line=$(head -n 1 Dockerfile)
if [[ $line != *"$BYOND_MAJOR.$BYOND_MINOR"* ]]; then
echo "Dockerfile BYOND version in FROM command does not match dependencies.sh (Or it's not on line 1)!"
exit 1
#!/usr/bin/env bash
set -e
source dependencies.sh
#ensure the Dockerfile version matches the dependencies.sh version
line=$(head -n 1 Dockerfile)
if [[ $line != *"$BYOND_MAJOR.$BYOND_MINOR"* ]]; then
@@ -41,19 +52,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
+5 -6
View File
@@ -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
fi;
source ~/.nvm/nvm.sh
nvm install $NODE_VERSION
pip3 install --user PyYaml
pip3 install --user beautifulsoup4
fi;