Merge pull request #8641 from Ghommie/Ghommie-cit47
port "PR to make travis use xenial and to make it work"
This commit is contained in:
+4
-1
@@ -1,5 +1,6 @@
|
|||||||
language: generic
|
language: generic
|
||||||
sudo: false
|
sudo: false
|
||||||
|
dist: xenial
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- ___TGS3TempBranch
|
- ___TGS3TempBranch
|
||||||
@@ -14,6 +15,7 @@ matrix:
|
|||||||
packages:
|
packages:
|
||||||
- python3
|
- python3
|
||||||
- python3-pip
|
- python3-pip
|
||||||
|
- python3-setuptools
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- tgui/node_modules
|
- tgui/node_modules
|
||||||
@@ -43,7 +45,8 @@ matrix:
|
|||||||
- gcc-multilib
|
- gcc-multilib
|
||||||
- g++-7
|
- g++-7
|
||||||
- g++-7-multilib
|
- g++-7-multilib
|
||||||
- libmariadbclient-dev:i386
|
- libmariadb-client-lgpl-dev:i386
|
||||||
|
- libmariadbd-dev
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.cargo
|
- $HOME/.cargo
|
||||||
|
|||||||
+18
-18
@@ -74,9 +74,9 @@ failed_cache_read = True
|
|||||||
if os.path.isfile(changelog_cache):
|
if os.path.isfile(changelog_cache):
|
||||||
try:
|
try:
|
||||||
with open(changelog_cache,encoding='utf-8') as f:
|
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
|
failed_cache_read = False
|
||||||
|
|
||||||
# Convert old timestamps to newer format.
|
# Convert old timestamps to newer format.
|
||||||
new_entries = {}
|
new_entries = {}
|
||||||
for _date in all_changelog_entries.keys():
|
for _date in all_changelog_entries.keys():
|
||||||
@@ -92,10 +92,10 @@ if os.path.isfile(changelog_cache):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("Failed to read cache:")
|
print("Failed to read cache:")
|
||||||
print(e, file=sys.stderr)
|
print(e, file=sys.stderr)
|
||||||
|
|
||||||
if args.dryRun:
|
if args.dryRun:
|
||||||
changelog_cache = os.path.join(args.ymlDir, '.dry_changelog.yml')
|
changelog_cache = os.path.join(args.ymlDir, '.dry_changelog.yml')
|
||||||
|
|
||||||
if failed_cache_read and os.path.isfile(args.targetFile):
|
if failed_cache_read and os.path.isfile(args.targetFile):
|
||||||
from bs4 import BeautifulSoup
|
from bs4 import BeautifulSoup
|
||||||
from bs4.element import NavigableString
|
from bs4.element import NavigableString
|
||||||
@@ -111,7 +111,7 @@ if failed_cache_read and os.path.isfile(args.targetFile):
|
|||||||
if author.endswith('updated:'):
|
if author.endswith('updated:'):
|
||||||
author = author[:-8]
|
author = author[:-8]
|
||||||
author = author.strip()
|
author = author.strip()
|
||||||
|
|
||||||
# Find <ul>
|
# Find <ul>
|
||||||
ulT = authorT.next_sibling
|
ulT = authorT.next_sibling
|
||||||
while(ulT.name != 'ul'):
|
while(ulT.name != 'ul'):
|
||||||
@@ -124,14 +124,14 @@ if failed_cache_read and os.path.isfile(args.targetFile):
|
|||||||
newdat = {changeT['class'][0] + '': val + ''}
|
newdat = {changeT['class'][0] + '': val + ''}
|
||||||
if newdat not in changes:
|
if newdat not in changes:
|
||||||
changes += [newdat]
|
changes += [newdat]
|
||||||
|
|
||||||
if len(changes) > 0:
|
if len(changes) > 0:
|
||||||
entry[author] = changes
|
entry[author] = changes
|
||||||
if date in all_changelog_entries:
|
if date in all_changelog_entries:
|
||||||
all_changelog_entries[date].update(entry)
|
all_changelog_entries[date].update(entry)
|
||||||
else:
|
else:
|
||||||
all_changelog_entries[date] = entry
|
all_changelog_entries[date] = entry
|
||||||
|
|
||||||
del_after = []
|
del_after = []
|
||||||
print('Reading changelogs...')
|
print('Reading changelogs...')
|
||||||
for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")):
|
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))
|
print(' Reading {}...'.format(fileName))
|
||||||
cl = {}
|
cl = {}
|
||||||
with open(fileName, 'r',encoding='utf-8') as f:
|
with open(fileName, 'r',encoding='utf-8') as f:
|
||||||
cl = yaml.load(f)
|
cl = yaml.load(f, Loader=yaml.SafeLoader)
|
||||||
f.close()
|
f.close()
|
||||||
if today not in all_changelog_entries:
|
if today not in all_changelog_entries:
|
||||||
all_changelog_entries[today] = {}
|
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)
|
print(' {0}: Invalid prefix {1}'.format(fileName, change_type), file=sys.stderr)
|
||||||
author_entries += [change]
|
author_entries += [change]
|
||||||
new += 1
|
new += 1
|
||||||
all_changelog_entries[today][cl['author']] = author_entries
|
all_changelog_entries[today][cl['author']] = author_entries
|
||||||
if new > 0:
|
if new > 0:
|
||||||
print(' Added {0} new changelog entries.'.format(new))
|
print(' Added {0} new changelog entries.'.format(new))
|
||||||
|
|
||||||
if cl.get('delete-after', False):
|
if cl.get('delete-after', False):
|
||||||
if os.path.isfile(fileName):
|
if os.path.isfile(fileName):
|
||||||
if args.dryRun:
|
if args.dryRun:
|
||||||
print(' Would delete {0} (delete-after set)...'.format(fileName))
|
print(' Would delete {0} (delete-after set)...'.format(fileName))
|
||||||
else:
|
else:
|
||||||
del_after += [fileName]
|
del_after += [fileName]
|
||||||
|
|
||||||
if args.dryRun: continue
|
if args.dryRun: continue
|
||||||
|
|
||||||
cl['changes'] = []
|
cl['changes'] = []
|
||||||
with open(fileName, 'w', encoding='utf-8') as f:
|
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)
|
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:
|
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]):
|
for (css_class, change) in (dictToTuples(e)[0] for e in all_changelog_entries[_date][author]):
|
||||||
if change in changes_added: continue
|
if change in changes_added: continue
|
||||||
write_entry = True
|
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\t<li class="{css_class}">{change}</li>\n'.format(css_class=css_class, change=change.strip())
|
||||||
author_htm += '\t\t\t</ul>\n'
|
author_htm += '\t\t\t</ul>\n'
|
||||||
if len(changes_added) > 0:
|
if len(changes_added) > 0:
|
||||||
entry_htm += author_htm
|
entry_htm += author_htm
|
||||||
if write_entry:
|
if write_entry:
|
||||||
changelog.write(entry_htm)
|
changelog.write(entry_htm)
|
||||||
|
|
||||||
with open(os.path.join(targetDir, 'templates', 'footer.html'), 'r', encoding='utf-8') as h:
|
with open(os.path.join(targetDir, 'templates', 'footer.html'), 'r', encoding='utf-8') as h:
|
||||||
for line in h:
|
for line in h:
|
||||||
changelog.write(line)
|
changelog.write(line)
|
||||||
|
|
||||||
|
|
||||||
with open(changelog_cache, 'w') as f:
|
with open(changelog_cache, 'w') as f:
|
||||||
cache_head = 'DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.'
|
cache_head = 'DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.'
|
||||||
|
|||||||
@@ -41,19 +41,10 @@ if [ $BUILD_TOOLS = false ] && [ $BUILD_TESTING = false ]; then
|
|||||||
echo "Setting up MariaDB."
|
echo "Setting up MariaDB."
|
||||||
rm -rf "$HOME/MariaDB"
|
rm -rf "$HOME/MariaDB"
|
||||||
mkdir -p "$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
|
mkdir -p "$HOME/MariaDB/include"
|
||||||
dpkg -x libmariadb2_2.0.0-1_i386.deb /tmp/extract
|
cp /usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/
|
||||||
rm libmariadb2_2.0.0-1_i386.deb
|
ln -s $HOME/MariaDB/libmariadb.so.2 $HOME/MariaDB/libmariadb.so
|
||||||
mv /tmp/extract/usr/lib/i386-linux-gnu/libmariadb.so.2 $HOME/MariaDB/
|
cp -r /usr/include/mariadb $HOME/MariaDB/include/
|
||||||
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
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd artifacts
|
cd artifacts
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ set -e
|
|||||||
source dependencies.sh
|
source dependencies.sh
|
||||||
|
|
||||||
if [ "$BUILD_TOOLS" = true ]; then
|
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
|
source ~/.nvm/nvm.sh
|
||||||
pip3 install --user PyYaml -q
|
nvm install $NODE_VERSION
|
||||||
pip3 install --user beautifulsoup4 -q
|
pip3 install --user PyYaml
|
||||||
|
pip3 install --user beautifulsoup4
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user