def plugin_loaded(): from gosubl import about from gosubl import sh from gosubl import ev from gosubl import gs from gosubl import mg9 if VERSION != about.VERSION: gs.show_output('GoSublime-main', '\n'.join([ 'GoSublime has been updated.', 'New version: `%s`, current version: `%s`' % (VERSION, about.VERSION), 'Please restart Sublime Text to complete the update.', execErr, ])) return if gs.attr('about.version'): gs.show_output('GoSublime-main', '\n'.join([ 'GoSublime appears to have been updated.', 'New ANNOUNCE: `%s`, current ANNOUNCE: `%s`' % (ANN, about.ANN), 'You may need to restart Sublime Text.', ])) return mods = [ ('gs', gs), ('sh', sh), ('mg9', mg9), ] gs.set_attr('about.version', VERSION) gs.set_attr('about.ann', ANN) for mod_name, mod in mods: print('GoSublime %s: init mod(%s)' % (VERSION, mod_name)) try: mod.gs_init({ 'version': VERSION, 'ann': ANN, 'margo_exe': MARGO_EXE, }) except TypeError: # old versions didn't take an arg mod.gs_init() ev.init.post_add = lambda e, f: f() ev.init() def cb(): aso = gs.aso() old_version = aso.get('version', '') old_ann = aso.get('ann', '') if about.VERSION > old_version or about.ANN > old_ann: aso.set('version', about.VERSION) aso.set('ann', about.ANN) gs.save_aso() gs.focus(gs.dist_path('CHANGELOG.md')) sublime.set_timeout(cb, 0)
def plugin_loaded(): from gosubl import about from gosubl import ev from gosubl import gs from gosubl import mg9 mods = [ ('gs', gs), ('mg9', mg9), ] gs.set_attr('about.version', VERSION) gs.set_attr('about.ann', ANN) for mod_name, mod in mods: print('GoSublime %s: init mod(%s)' % (VERSION, mod_name)) try: mod.gs_init({ 'version': VERSION, 'ann': ANN, 'margo_exe': MARGO_EXE, }) except TypeError: # old versions didn't take an arg mod.gs_init() ev.init.post_add = lambda e, f: f() ev.init() def cb(): aso = gs.aso() old_version = aso.get('version', '') old_ann = aso.get('ann', '') if about.VERSION > old_version or about.ANN > old_ann: aso.set('version', about.VERSION) aso.set('ann', about.ANN) gs.save_aso() gs.focus(gs.dist_path('CHANGELOG.md')) sublime.set_timeout(cb, 0)
def plugin_loaded(): from gosubl import about from gosubl import cfg from gosubl import ui from gosubl import vu from gosubl import sh from gosubl import ev from gosubl import gs from gosubl import mg9 from gosubl import hl from gosubl import nineo from gosubl import nineo_builtins if VERSION != about.VERSION: gs.show_output('GoSublime-main', '\n'.join([ 'GoSublime has been updated.', 'New version: `%s`, current version: `%s`' % (VERSION, about.VERSION), 'Please restart Sublime Text to complete the update.', execErr, ])) return if gs.attr('about.version'): gs.show_output('GoSublime-main', '\n'.join([ 'GoSublime appears to have been updated.', 'New ANNOUNCE: `%s`, current ANNOUNCE: `%s`' % (ANN, about.ANN), 'You may need to restart Sublime Text.', ])) return mods = [ ('cfg', cfg), ('ui', ui), ('vu', vu), ('gs', gs), ('sh', sh), ('mg9', mg9), ('9o', nineo), ('hl', hl), ('9o-builtins', nineo_builtins), ] gs.set_attr('about.version', VERSION) gs.set_attr('about.ann', ANN) m = { 'version': VERSION, 'ann': ANN, } for mod_name, mod in mods: print('GoSublime %s: init mod(%s)' % (about.VERSION, mod_name)) try: mod.gs_init(m) except TypeError: # old versions didn't take an arg mod.gs_init() ev.init.post_add = lambda e, f: f() ev.init() def cb(): aso = gs.aso() if about.ANN != aso.get('ann', ''): aso.set('ann', about.ANN) gs.save_aso() vu.open(gs.dist_path('CHANGELOG.md')) sublime.set_timeout(cb, 0) pd = os.path.join(gs.packages_dir(), 'User') sys.path.insert(0, pd) try: import MyGoSublime MyGoSublime.gs_init(m) except AttributeError: pass except ImportError: pass finally: sys.path.remove(pd)
def plugin_loaded(): from gosubl import about from gosubl import cfg from gosubl import ui from gosubl import vu from gosubl import sh from gosubl import ev from gosubl import gs from gosubl import mg9 from gosubl import hl from gosubl import nineo from gosubl import nineo_builtins if VERSION != about.VERSION: gs.show_output( 'GoSublime-main', '\n'.join([ 'GoSublime has been updated.', 'New version: `%s`, current version: `%s`' % (VERSION, about.VERSION), 'Please restart Sublime Text to complete the update.', execErr, ])) return if gs.attr('about.version'): gs.show_output( 'GoSublime-main', '\n'.join([ 'GoSublime appears to have been updated.', 'New ANNOUNCE: `%s`, current ANNOUNCE: `%s`' % (ANN, about.ANN), 'You may need to restart Sublime Text.', ])) return mods = [ ('cfg', cfg), ('ui', ui), ('vu', vu), ('gs', gs), ('sh', sh), ('mg9', mg9), ('9o', nineo), ('hl', hl), ('9o-builtins', nineo_builtins), ] gs.set_attr('about.version', VERSION) gs.set_attr('about.ann', ANN) m = { 'version': VERSION, 'ann': ANN, } for mod_name, mod in mods: print('GoSublime %s: init mod(%s)' % (about.VERSION, mod_name)) try: mod.gs_init(m) except TypeError: # old versions didn't take an arg mod.gs_init() ev.init.post_add = lambda e, f: f() ev.init() def cb(): aso = gs.aso() if about.ANN != aso.get('ann', ''): aso.set('ann', about.ANN) gs.save_aso() vu.open(gs.dist_path('CHANGELOG.md')) sublime.set_timeout(cb, 0) pd = os.path.join(gs.packages_dir(), 'User') sys.path.insert(0, pd) try: import MyGoSublime MyGoSublime.gs_init(m) except AttributeError: pass except ImportError: pass finally: sys.path.remove(pd)
def plugin_loaded(): from gosubl import about from gosubl import sh from gosubl import ev from gosubl import gs from gosubl import mg9 if VERSION != about.VERSION: gs.show_output( "GoSublime-main", "\n".join( [ "GoSublime has been updated.", "New version: `%s`, current version: `%s`" % (VERSION, about.VERSION), "Please restart Sublime Text to complete the update.", execErr, ] ), ) return if gs.attr("about.version"): gs.show_output( "GoSublime-main", "\n".join( [ "GoSublime appears to have been updated.", "New ANNOUNCE: `%s`, current ANNOUNCE: `%s`" % (ANN, about.ANN), "You may need to restart Sublime Text.", ] ), ) return mods = [("gs", gs), ("sh", sh), ("mg9", mg9)] gs.set_attr("about.version", VERSION) gs.set_attr("about.ann", ANN) for mod_name, mod in mods: print("GoSublime %s: init mod(%s)" % (VERSION, mod_name)) try: mod.gs_init({"version": VERSION, "ann": ANN, "margo_exe": MARGO_EXE}) except TypeError: # old versions didn't take an arg mod.gs_init() ev.init.post_add = lambda e, f: f() ev.init() def cb(): aso = gs.aso() old_version = aso.get("version", "") old_ann = aso.get("ann", "") if about.VERSION > old_version or about.ANN > old_ann: aso.set("version", about.VERSION) aso.set("ann", about.ANN) gs.save_aso() gs.focus(gs.dist_path("CHANGELOG.md")) sublime.set_timeout(cb, 0)