Community
    • Login

    Version Incrementation

    Scheduled Pinned Locked Moved General Discussion
    3 Posts 3 Posters 868 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Maciej EcksteinM
      Maciej Eckstein
      last edited by

      Hi All
      Is there there any way to implement a version number that would be automatically added to my script. I have a service script running on many many hosts and loose track what version of the script is installed where.
      Edit them remotely over the network share. and love to have a little comment line
      #ver 1.0.123
      That would auto increment with every save.
      Can that be done?

      Maciej

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones
        last edited by

        In pure Notepad++, no.

        You could use the PythonScript plugin to add a callback to the SAVE event, which would search the active buffer for your #!ver line, then auto-increment it. But this is re-inventing the wheel:

        The subversion (svn) version-control system can do that automatically for you using it’s keyword substitution feature. I’m not a git expert, but I think it has something similar. Using version control, like svn or git, for tracking code changes and code versions is A Really Good Idea™, and I’d highly recommend one of those, rather than re-inventing the wheel with scripts inside of Notepad++. (OTOH, adding scripts in Notepad++ to automate the version-control process is not a bad idea)

        1 Reply Last reply Reply Quote 1
        • Alan KilbornA
          Alan Kilborn @Maciej Eckstein
          last edited by

          @Maciej-Eckstein

          Peter’s comments aside, HOW exactly would this be useful? It seems like it would be very easy to end up with several version 1.0.124 (for ex.) of scripts that are different content-wise, but yet have the same version # ?

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors