fixing publishing issue with updating from <0.8.6

previously, symlinks were not being created correctly; this commit
should address that.
master
endorphant 2016-06-09 21:18:34 -04:00
parent 116be618a0
commit aebdd51d08
2 changed files with 17 additions and 7 deletions

View File

@ -824,7 +824,7 @@ please enter\
def unpublish(): def unpublish():
''' '''
remove user's published directory, if it exists remove user's published directory, if it exists. this should only remove the symlink in public_html.
''' '''
dir = SETTINGS.get("publish dir") dir = SETTINGS.get("publish dir")
@ -956,14 +956,16 @@ def update_version():
# change www symlink # change www symlink
if os.path.exists(WWW): if os.path.exists(WWW):
subprocess.call(["rm", WWW]) subprocess.call(["rm", WWW])
subprocess.call(["mkdir", WWW])
subprocess.call(["mkdir", WWW])
subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")]) subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")])
publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir")) publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir"))
if os.path.exists(publishDir): if os.path.exists(publishDir):
subprocess.call(["rm", "-rf", publishDir]) subprocess.call(["rm", "-rf", publishDir])
subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))])
subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))])
# repopulate html files # repopulate html files
core.load_files() core.load_files()
@ -991,7 +993,10 @@ def update_version():
# increment user versionfile # increment user versionfile
open(versionFile, "w").write(__version__) open(versionFile, "w").write(__version__)
print("\nyou're all good to go, "+chatter.say("friend")+"!\n") print("""
you're all good to go, "+chatter.say("friend")+"! please contact ~endorphant if
somehing strange happened to you during this update.
""")
# show patch notes # show patch notes
#if userVersion != "0.9.0" and userVersion != "0.9.0b": #if userVersion != "0.9.0" and userVersion != "0.9.0b":

View File

@ -893,14 +893,16 @@ def update_version():
# change www symlink # change www symlink
if os.path.exists(WWW): if os.path.exists(WWW):
subprocess.call(["rm", WWW]) subprocess.call(["rm", WWW])
subprocess.call(["mkdir", WWW])
subprocess.call(["mkdir", WWW])
subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")]) subprocess.call(["ln", "-s", os.path.join(CONFIG, "style.css"), os.path.join(WWW, "style.css")])
publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir")) publishDir = os.path.join(PUBLIC, SETTINGS.get("publish dir"))
if os.path.exists(publishDir): if os.path.exists(publishDir):
subprocess.call(["rm", "-rf", publishDir]) subprocess.call(["rm", "-rf", publishDir])
subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))])
subprocess.call(["ln", "-s", WWW, os.path.join(PUBLIC, SETTINGS.get("publish dir"))])
# repopulate html files # repopulate html files
core.load_files() core.load_files()
@ -928,7 +930,10 @@ def update_version():
# increment user versionfile # increment user versionfile
open(versionFile, "w").write(__version__) open(versionFile, "w").write(__version__)
print("\nyou're all good to go, "+chatter.say("friend")+"!\n") print("""
you're all good to go, "+chatter.say("friend")+"! please contact ~endorphant if
somehing strange happened to you during this update.
""")
# show patch notes # show patch notes
if userVersion != "0.9.0" and userVersion != "0.9.0b": if userVersion != "0.9.0" and userVersion != "0.9.0b":