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,6 +956,7 @@ 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")])
@ -963,6 +964,7 @@ def update_version():
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
@ -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,6 +893,7 @@ 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")])
@ -900,6 +901,7 @@ def update_version():
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
@ -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":