Пример #1
0
def plugin_loaded():
    from gosubl import about
    from gosubl import gs
    from gosubl import mg9

    gs.gs_init()
    mg9.gs_init()

    # we need the values in the file on-disk but we don't want any interference with the live env
    try:
        gs.set_attr('about.version', VERSION)
        gs.set_attr('about.ann', ANN)

        if about.VERSION != VERSION:
            gs.show_output(
                'GoSublime-source', '\n'.join([
                    'GoSublime source has been updated.',
                    'New version: `%s`, current version: `%s`' %
                    (VERSION, about.VERSION),
                    'Please restart Sublime Text to complete the update.',
                ]))
    except Exception:
        pass

    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)
Пример #2
0
def plugin_loaded():
	from gosubl import about
	from gosubl import gs
	from gosubl import mg9

	gs.gs_init()
	mg9.gs_init()

	# we need the values in the file on-disk but we don't want any interference with the live env
	try:
		gs.set_attr('about.version', VERSION)
		gs.set_attr('about.ann', ANN)

		if about.VERSION != VERSION:
			gs.show_output('GoSublime-source', '\n'.join([
				'GoSublime source has been updated.',
				'New version: `%s`, current version: `%s`' % (VERSION, about.VERSION),
				'Please restart Sublime Text to complete the update.',
			]))
	except Exception:
		pass

	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)
Пример #3
0
def plugin_loaded():
	from gosubl import about
	from gosubl import gs
	from gosubl import mg9

	gs.gs_init()
	mg9.gs_init()

	gs.set_attr('about.version', about.VERSION)
	gs.set_attr('about.ann', about.ANN)
Пример #4
0
def plugin_loaded():
	from gosubl import gs
	from gosubl import mg9

	gs.gs_init()
	mg9.gs_init()