Attempt to update CI to Python 3. #16
This commit is contained in:
parent
59803d547c
commit
a93d334b1f
@ -1,4 +1,9 @@
|
|||||||
# Jobs to build the two channels in Socializer.
|
# Jobs to build the two channels in Socializer.
|
||||||
|
variables:
|
||||||
|
PYTHON3: "C:\\python37\\python.exe"
|
||||||
|
PYINSTALLER: "C:\\python37\\scripts\\pyinstaller.exe"
|
||||||
|
PYTHON2: "C:\\python27\\python.exe"
|
||||||
|
|
||||||
alpha:
|
alpha:
|
||||||
type: deploy
|
type: deploy
|
||||||
tags:
|
tags:
|
||||||
@ -26,6 +31,35 @@ alpha:
|
|||||||
name: socializer
|
name: socializer
|
||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
|
alpha_python3:
|
||||||
|
type: deploy
|
||||||
|
tags:
|
||||||
|
- windows10
|
||||||
|
before_script:
|
||||||
|
- '%PYTHON3% -v'
|
||||||
|
- '%PYTHON3% -m pip install --upgrade pip pyenchant'
|
||||||
|
- '%PYTHON3% -m pip install --upgrade -r requirements.txt'
|
||||||
|
script:
|
||||||
|
- copy changelog.md doc\changelog.md
|
||||||
|
- cd doc
|
||||||
|
- '%PYTHON2% documentation_importer.py'
|
||||||
|
- cd ..\src
|
||||||
|
- '%PYTHON2% ..\doc\generator.py'
|
||||||
|
- '%PYTHON3% write_version_data.py'
|
||||||
|
- '%PYINSTALLER% main.spec'
|
||||||
|
- cd ..
|
||||||
|
- cd scripts
|
||||||
|
- '%PYTHON3% prepare_zipversion.py'
|
||||||
|
- cd ..
|
||||||
|
- move src\socializer.zip socializer.zip
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- socializer_py3.zip
|
||||||
|
name: socializer
|
||||||
|
expire_in: 1 hour
|
||||||
|
|
||||||
stable:
|
stable:
|
||||||
type: deploy
|
type: deploy
|
||||||
tags:
|
tags:
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
|
#! /usr/bin/env python# -*- coding: iso-8859-1 -*-
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
def create_archive():
|
def create_archive():
|
||||||
os.chdir("..\\src")
|
os.chdir("..\\src")
|
||||||
print "Creating zip archive..."
|
print("Creating zip archive...")
|
||||||
shutil.make_archive("socializer", "zip", "dist")
|
if sys.version[0] == "3":
|
||||||
if os.path.exists("dist"):
|
folder = "dist/main"
|
||||||
shutil.rmtree("dist")
|
else:
|
||||||
|
folder = "dist"
|
||||||
|
shutil.make_archive("socializer", "zip", folder)
|
||||||
|
# if os.path.exists("dist"):
|
||||||
|
# shutil.rmtree("dist")
|
||||||
if os.path.exists("build"):
|
if os.path.exists("build"):
|
||||||
shutil.rmtree("build")
|
shutil.rmtree("build")
|
||||||
os.chdir("..\\scripts")
|
os.chdir("..\\scripts")
|
||||||
|
Loading…
Reference in New Issue
Block a user