Browse Source

Merge pull request #10316 from mayx/HPCC-17859

HPCC-18038 Remove the version option from the publish and java command

Reviewed-By: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Reviewed-By: Rodrigo Pastrana <rodrigo.pastrana@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 years ago
parent
commit
419fbb58b3

+ 2 - 2
clienttools/IDEPlugins/ESDL/esdl.bat.in

@@ -60,8 +60,8 @@ for /f "tokens=1,2,3 delims=/:" %%a in ("%8") do set http=%%a&set server=%%b&set
 echo.server: %server% >> %TMP%\log.txt
 echo.port  : %port% >> %TMP%\log.txt
 
-echo "%clienttoolsbindir%\esdl.exe publish %newinput% %2 --server %server%  --port %port% --version 1.0 --username %6 --password %9 -v" >>%TMP%\log.txt
-"%clienttoolsbindir%"\esdl.exe publish %newinput% %2 --server %server%  --port %port% --version 1.0 --username %6 --password %9 -v 2>%5 >>%TMP%\log.txt
+echo "%clienttoolsbindir%\esdl.exe publish %newinput% %2 --server %server% --port %port% --username %6 --password %9 -v" >>%TMP%\log.txt
+"%clienttoolsbindir%"\esdl.exe publish %newinput% %2 --server %server% --port %port% --username %6 --password %9 -v 2>%5 >>%TMP%\log.txt
 goto end
 
 :genecl

+ 1 - 1
esp/esdllib/esdl_def.cpp

@@ -1662,7 +1662,7 @@ void EsdlDefinition::walkDefinitionDepthFirst( AddedObjs& foundByName, EsdlDefOb
     // ancestors- they've already been added.
     // Checking up front here will also allow us to detect cycles in the strcuture
     // graph -such as we have with BpsReportRelative- and avoid an infinite loop
-    if( found || esdlObj->checkOptional(opts) == false || esdlObj->checkVersion(requestedVer) == false )
+    if (found || esdlObj->checkOptional(opts) == false || (requestedVer != 0.0 && esdlObj->checkVersion(requestedVer) == false))
     {
         //DBGLOG("%s</%s><Skipped/>", indent.str(), esdlObj->queryName());
         return;

+ 2 - 2
initfiles/examples/EsdlExample/ReadMeFirst.txt

@@ -24,7 +24,7 @@ Make a copy of the /opt/HPCCSystems/examples/EsdlExample folder.
 From EsdlExample copy folder:
 
 1. Generate java base classes (and dummy implementation file): 
-esdl java esdl_example.esdl EsdlExample --version=9
+esdl java esdl_example.esdl EsdlExample
 
 2. Compile java base classes and example service (must have sudo access to place the classes in the default HPCC class location):
 sudo javac -g EsdlExampleServiceBase.java -cp /opt/HPCCSystems/classes -d /opt/HPCCSystems/classes/
@@ -37,7 +37,7 @@ esdl ecl esdl_example.esdl .
 ecl publish roxie RoxieEchoPersonInfo.ecl
 
 5. Publish the esdl defined service to dynamicESDL:
- esdl publish esdl_example.esdl EsdlExample --version 9 --overwrite
+ esdl publish esdl_example.esdl EsdlExample --overwrite
 
 5. Bind both java and roxie implementations to DynamicESDL
 esdl bind-service myesp 8088 esdlexample.1 EsdlExample --config esdl_binding.xml --overwrite

+ 21 - 66
tools/esdlcmd/esdl-publish.cpp

@@ -30,8 +30,6 @@ protected:
     StringAttr optService;
     StringAttr optWSProcAddress;
     StringAttr optWSProcPort;
-    StringAttr optVersionStr;
-    double     optVersion;
     StringAttr optUser;
     StringAttr optPass;
     StringAttr optESDLDefID;
@@ -79,7 +77,6 @@ public:
                 "   --port <port>                WsESDLConfig service port\n"
                 "   -u, --username <name>        Username for accessing WsESDLConfig service\n"
                 "   -pw, --password <pw>         Password for accessing WsESDLConfig service\n"
-                "   --version <ver>              ESDL service version\n"
                 );
         EsdlCmdCommon::usage();
     }
@@ -94,8 +91,6 @@ public:
             return true;
         if (iter.matchFlag(optWSProcPort, ESDL_OPTION_SERVICE_PORT) || iter.matchFlag(optWSProcPort, ESDL_OPT_SERVICE_PORT))
             return true;
-        if (iter.matchFlag(optVersionStr, ESDLOPT_VERSION))
-            return true;
         if (iter.matchFlag(optUser, ESDL_OPT_SERVICE_USER) || iter.matchFlag(optUser, ESDL_OPTION_SERVICE_USER))
             return true;
         if (iter.matchFlag(optPass, ESDL_OPT_SERVICE_PASS) || iter.matchFlag(optPass, ESDL_OPTION_SERVICE_PASS))
@@ -127,7 +122,7 @@ public:
         Owned<IClientPublishESDLDefinitionRequest> request = esdlConfigClient->createPublishESDLDefinitionRequest();
 
         StringBuffer esxml;
-        esdlHelper->getServiceESXDL(optSource.get(), optESDLService.get(), esxml, optVersion);
+        esdlHelper->getServiceESXDL(optSource.get(), optESDLService.get(), esxml, 0);
 
         if (esxml.length()==0)
         {
@@ -152,7 +147,7 @@ public:
             return 1;
         }
 
-        fprintf(stdout, "\nESDL Service: %s(%f): %s", optESDLService.get() ,optVersion, resp->getStatus().getDescription());
+        fprintf(stdout, "\nESDL Service: %s: %s", optESDLService.get(), resp->getStatus().getDescription());
 
         return 0;
     }
@@ -229,19 +224,6 @@ public:
 
     bool finalizeOptions(IProperties *globals)
     {
-        if (!optVersionStr.isEmpty())
-        {
-            optVersion = atof( optVersionStr.get() );
-            if( optVersion <= 0 )
-            {
-                throw MakeStringException( 0, "Version option must be followed by a real number > 0" );
-            }
-        }
-        else
-        {
-            fprintf(stderr, "\nWARNING: ESDL Version not specified.\n");
-        }
-
         if (optSource.isEmpty())
             throw MakeStringException( 0, "Source ESDL definition file (ecm|esdl|xml) must be provided" );
 
@@ -558,12 +540,9 @@ public:
         Owned<IClientWsESDLConfig> esdlConfigClient = EsdlCmdHelper::getWsESDLConfigSoapService(optWSProcAddress, optWSProcPort, optUser, optPass);
         Owned<IClientDeleteESDLDefinitionRequest> request = esdlConfigClient->createDeleteESDLDefinitionRequest();
 
-        fprintf(stdout,"\nAttempting to delete ESDL definition: '%s.%d'\n", optESDLService.get(), (int)optVersion);
+        fprintf(stdout,"\nAttempting to delete ESDL definition: '%s'\n", optESDLDefID.get());
 
-        StringBuffer id;
-        id.setf("%s.%d", optESDLService.get(), (int)optVersion);
-
-        request->setId(id);
+        request->setId(optESDLDefID.get());
 
         Owned<IClientDeleteESDLRegistryEntryResponse> resp = esdlConfigClient->DeleteESDLDefinition(request);
 
@@ -581,18 +560,17 @@ public:
     void usage()
     {
         printf( "\nUsage:\n\n"
-                "esdl delete <ESDLServiceDefinitionName> <ESDLServiceDefinitionVersion> [command options]\n\n"
-                "   ESDLServiceDefinitionName         The name of the ESDL service definition to delete\n"
-                "   ESDLServiceDefinitionVersion      The version of the ESDL service definition to delete\n");
+                "esdl delete <ESDLDefinitionID> [command options]\n\n"
+                "   ESDLDefinitionID      The ESDL definition id <esdldefname>.<esdldefver>\n");
 
         EsdlPublishCmdCommon::usage();
 
         printf( "\n   Use this command to delete an ESDL Service definition.\n"
-                "   To delete an ESDL Service definition, provide the definition name and version\n"
+                "   To delete an ESDL Service definition, provide the ESDL definition id\n"
                 );
 
         printf("\nExample:"
-                ">esdl delete myesdldef 5\n"
+                ">esdl delete myesdldef.5\n"
                 );
     }
 
@@ -604,7 +582,7 @@ public:
             return false;
         }
 
-        for (int cur = 0; cur < 2 && !iter.done(); cur++)
+        for (int cur = 0; cur < 1 && !iter.done(); cur++)
         {
            const char *arg = iter.query();
            if (*arg != '-')
@@ -612,10 +590,7 @@ public:
                switch (cur)
                {
                 case 0:
-                    optESDLService.set(arg);
-                    break;
-                case 1:
-                    optVersionStr.set(arg);
+                    optESDLDefID.set(arg);
                     break;
                }
            }
@@ -652,19 +627,8 @@ public:
     bool finalizeOptions(IProperties *globals)
     {
 
-        if (optESDLService.isEmpty())
-            throw MakeStringException( 0, "Name of ESDL service definition must be provided!" );
-
-        if (!optVersionStr.isEmpty())
-        {
-            optVersion = atof( optVersionStr.get() );
-            if( optVersion <= 0 )
-            {
-                throw MakeStringException( 0, "Version option must be followed by a real number > 0" );
-            }
-        }
-        else
-            throw MakeStringException( 0, "ESDL service definition version must be provided!" );
+        if (optESDLDefID.isEmpty())
+            throw MakeStringException( 0, "ESDLDefinitionID must be provided!" );
 
         return EsdlPublishCmdCommon::finalizeOptions(globals);
     }
@@ -823,8 +787,7 @@ public:
         request->setEspProcName(optTargetESPProcName);
         request->setEspBindingName(optBindingName);
         request->setEsdlServiceName(optService.get());
-        VStringBuffer id("%s.%d", optService.get(), (int)optVersion);
-        request->setEsdlDefinitionID(id.str());
+        request->setEsdlDefinitionID(optESDLDefID.get());
         request->setConfig(optInput);
         request->setOverwrite(optOverWrite);
 
@@ -847,11 +810,11 @@ public:
     void usage()
     {
         printf( "\nUsage:\n\n"
-                "esdl bind-method <TargetESPProcessName> <TargetESPBindingName> <TargetServiceName> <TargetServiceDefVersion> <TargetMethodName> [command options]\n\n"
+                "esdl bind-method <TargetESPProcessName> <TargetESPBindingName> <TargetServiceName> <TargetESDLDefinitionID> <TargetMethodName> [command options]\n\n"
                 "   TargetESPProcessName                             The target ESP Process name\n"
                 "   TargetESPBindingName                             The target ESP binding name associated with this service\n"
                 "   TargetServiceName                                The name of the Service to bind (must already be defined in dali.)\n"
-                "   TargetServiceDefVersion                          The version of the target service ESDL definition (must exist in dali)\n"
+                "   TargetESDLDefinitionID                           The id of the target ESDL definition (must exist in dali)\n"
                 "   TargetMethodName                                 The name of the target method (must exist in the service ESDL definition)\n"
 
                 "\nOptions (use option flag followed by appropriate value):\n"
@@ -863,7 +826,7 @@ public:
         printf( "\n Use this command to publish ESDL Service based bindings.\n"
                 "   To bind a ESDL Service, provide the target ESP process name\n"
                 "   (esp which will host the service.) \n"
-                "   It is also necessary to provide the Port on which this service is configured to run (ESP Binding),\n"
+                "   It is also necessary to provide the target ESP binding name,\n"
                 "   and the name of the service you are binding.\n"
                 "   Optionally provide configuration information either directly, or via a\n"
                 "   configuration file in the following syntax:\n"
@@ -874,7 +837,7 @@ public:
                 );
 
         printf("\nExample:"
-                ">esdl bind-service myesp 8088 WsMyService --config /myService/methods.xml\n"
+                ">esdl bind-method myesp mybinding WsMyService WsMyService.1 myMethod --config /myService/methods.xml\n"
                 );
     }
 
@@ -904,7 +867,7 @@ public:
                     optService.set(arg);
                     break;
                 case 3:
-                    optVersionStr.set(arg);
+                    optESDLDefID.set(arg);
                     break;
                 case 4:
                     optMethod.set(arg);
@@ -947,23 +910,15 @@ public:
             }
         }
 
-        if (!optVersionStr.isEmpty())
-        {
-            optVersion = atof( optVersionStr.get() );
-            if( optVersion <= 0 )
-            {
-                throw MakeStringException( 0, "Version option must be followed by a real number > 0" );
-            }
-        }
-        else
-            throw MakeStringException( 0, "ESDL service definition version must be provided!" );
-
         if(optTargetESPProcName.isEmpty())
             throw MakeStringException( 0, "Name of Target ESP process must be provided" );
 
         if (optService.isEmpty())
             throw MakeStringException( 0, "Name of ESDL based service must be provided" );
 
+        if (optESDLDefID.isEmpty())
+            throw MakeStringException( 0, "ESDLDefinitionID must be provided!" );
+
         if (optMethod.isEmpty())
             throw MakeStringException( 0, "Name of ESDL based method must be provided" );
 

+ 2 - 0
tools/esdlcmd/esdlcmd_common.hpp

@@ -62,6 +62,8 @@ typedef IEsdlCommand *(*EsdlCommandFactory)(const char *cmdname);
 #define ESDLOPT_XSLT_PATH               "--xslt"
 
 #define ESDLOPT_VERSION                 "--version"
+#define ESDLOPT_INTERFACE_VERSION       "--interface-version"
+#define ESDLOPT_INTERFACE_VERSION_S     "-iv"
 #define ESDLOPT_SERVICE                 "--service"
 #define ESDLOPT_METHOD                  "--method"
 #define ESDLOPT_PREPROCESS_OUT          "--preprocess-output"

+ 21 - 33
tools/esdlcmd/esdlcmd_core.cpp

@@ -30,7 +30,7 @@
 class Esdl2XSDCmd : public EsdlHelperConvertCmd
 {
 public:
-    Esdl2XSDCmd() : optVersion(0), optAllAnnot(false), optNoAnnot(false),
+    Esdl2XSDCmd() : optInterfaceVersion(0), optAllAnnot(false), optNoAnnot(false),
                     optEnforceOptional(true), optRawOutput(false), optXformTimes(1), optFlags(DEPFLAG_COLLAPSE|DEPFLAG_ARRAYOF),
                     outfileext(".xsd")
     {}
@@ -85,7 +85,7 @@ public:
 
     virtual bool parseCommandLineOption(ArgvIterator &iter)
     {
-        if (iter.matchOption(optVersionStr, ESDLOPT_VERSION))
+        if (iter.matchOption(optInterfaceVersionStr, ESDLOPT_INTERFACE_VERSION) || iter.matchOption(optInterfaceVersionStr, ESDLOPT_INTERFACE_VERSION_S))
             return true;
         if (iter.matchOption(optService, ESDLOPT_SERVICE))
             return true;
@@ -135,10 +135,10 @@ public:
             throw( MakeStringException(0, "A service name must be provided") );
         }
 
-        if (!optVersionStr.isEmpty())
+        if (!optInterfaceVersionStr.isEmpty())
         {
-            optVersion = atof( optVersionStr.get() );
-            if( optVersion <= 0 )
+            optInterfaceVersion = atof( optInterfaceVersionStr.get() );
+            if ( optInterfaceVersion <= 0 )
             {
                 throw MakeStringException( 0, "Version option must be followed by a real number > 0" );
             }
@@ -197,7 +197,7 @@ public:
     virtual void doTransform(IEsdlDefObjectIterator& objs, StringBuffer &target, double version=0, IProperties *opts=NULL, const char *ns=NULL, unsigned flags=0 )
     {
         TimeSection ts("transforming via XSLT");
-        cmdHelper.defHelper->toXSD( objs, target, EsdlXslToXsd, optVersion, opts, NULL, optFlags );
+        cmdHelper.defHelper->toXSD( objs, target, EsdlXslToXsd, optInterfaceVersion, opts, NULL, optFlags );
     }
 
     virtual void loadTransform( StringBuffer &xsltpath, IProperties *params)
@@ -216,7 +216,7 @@ public:
         loadServiceDef();
         createOptionals();
 
-        Owned<IEsdlDefObjectIterator> structs = cmdHelper.esdlDef->getDependencies( optService.get(), optMethod.get(), ESDLOPTLIST_DELIMITER, optVersion, opts.get(), optFlags );
+        Owned<IEsdlDefObjectIterator> structs = cmdHelper.esdlDef->getDependencies( optService.get(), optMethod.get(), ESDLOPTLIST_DELIMITER, optInterfaceVersion, opts.get(), optFlags );
 
         if( optRawOutput )
         {
@@ -231,7 +231,7 @@ public:
 
             for( unsigned i=0; i < optXformTimes; i++ )
             {
-                doTransform( *structs, outputBuffer, optVersion, opts.get(), NULL, optFlags );
+                doTransform( *structs, outputBuffer, optInterfaceVersion, opts.get(), NULL, optFlags );
             }
 
             outputToFile();
@@ -249,7 +249,7 @@ public:
     void printOptions()
     {
         puts("Options:");
-        puts("  --version <version number> : Constrain to interface version");
+        puts("  -iv,--interface-version <version number> : Constrain to interface version");
         puts("  --method <method name>[;<method name>]* : Constrain to list of specific method(s)" );
         puts("  --xslt <xslt file path> : Path to '/xslt/esxdl2xsd.xslt' file to transform EsdlDef to XSD" );
         puts("  --preprocess-output <raw output directory> : Output pre-processed xml file to specified directory before applying XSLT transform" );
@@ -293,7 +293,7 @@ public:
             StringBuffer empty;
 
             xmlOut.appendf( "<esxdl name=\"%s\">", optService.get());
-            cmdHelper.defHelper->toXML( obj, xmlOut, optVersion, opts.get(), optFlags );
+            cmdHelper.defHelper->toXML( obj, xmlOut, optInterfaceVersion, opts.get(), optFlags );
             xmlOut.append("</esxdl>");
 
             saveAsFile( optPreprocessOutputDir.get(), empty, xmlOut.str(), NULL );
@@ -414,8 +414,8 @@ public:
            ns.append('(').append(ns_optionals.str()).append(')');
         */
 
-       if (optVersion > 0)
-        ns.append("@ver=").appendf("%g", optVersion);
+       if (optInterfaceVersion > 0)
+        ns.append("@ver=").appendf("%g", optInterfaceVersion);
        return ns.toLowerCase();
     }
 
@@ -472,8 +472,8 @@ public:
     StringAttr optTargetNamespace;
     StringAttr optPreprocessOutputDir;
     bool optRawOutput;
-    StringAttr optVersionStr;
-    double optVersion;
+    StringAttr optInterfaceVersionStr;
+    double optInterfaceVersion;
     unsigned int optXformTimes;
     unsigned optFlags;
     bool optNoCollapse;
@@ -523,7 +523,7 @@ public:
     virtual void doTransform(IEsdlDefObjectIterator& objs, StringBuffer &target, double version=0, IProperties *opts=NULL, const char *ns=NULL, unsigned flags=0 )
     {
         TimeSection ts("transforming via XSLT");
-        cmdHelper.defHelper->toWSDL(objs, target, EsdlXslToWsdl, optVersion, opts, NULL, optFlags);
+        cmdHelper.defHelper->toWSDL(objs, target, EsdlXslToWsdl, optInterfaceVersion, opts, NULL, optFlags);
     }
 
     virtual void loadTransform( StringBuffer &xsltpath, IProperties *params)
@@ -542,7 +542,7 @@ public:
         loadServiceDef();
         createOptionals();
 
-        Owned<IEsdlDefObjectIterator> structs = cmdHelper.esdlDef->getDependencies( optService.get(), optMethod.get(), ESDLOPTLIST_DELIMITER, optVersion, opts.get(), optFlags );
+        Owned<IEsdlDefObjectIterator> structs = cmdHelper.esdlDef->getDependencies( optService.get(), optMethod.get(), ESDLOPTLIST_DELIMITER, optInterfaceVersion, opts.get(), optFlags );
 
         if( optRawOutput )
         {
@@ -556,7 +556,7 @@ public:
 
             for( unsigned i=0; i < optXformTimes; i++ )
             {
-                doTransform( *structs, outputBuffer, optVersion, opts.get(), NULL, optFlags );
+                doTransform( *structs, outputBuffer, optInterfaceVersion, opts.get(), NULL, optFlags );
             }
 
             outputToFile();
@@ -616,7 +616,7 @@ public:
 class Esdl2JavaCmd : public EsdlHelperConvertCmd
 {
 public:
-    Esdl2JavaCmd() : optVersion(0), optFlags(0)
+    Esdl2JavaCmd() : optFlags(0)
     {}
 
     virtual bool parseCommandLineOptions(ArgvIterator &iter)
@@ -668,8 +668,6 @@ public:
 
     virtual bool parseCommandLineOption(ArgvIterator &iter)
     {
-        if (iter.matchOption(optVersionStr, ESDLOPT_VERSION))
-            return true;
         if (iter.matchOption(optService, ESDLOPT_SERVICE))
             return true;
         if (iter.matchOption(optMethod, ESDLOPT_METHOD))
@@ -703,13 +701,6 @@ public:
             throw( MakeStringException(0, "A service name must be provided") );
         }
 
-        if (!optVersionStr.isEmpty())
-        {
-            optVersion = atof( optVersionStr.get() );
-            if( optVersion <= 0 )
-                throw MakeStringException( 0, "Version option must be followed by a real number > 0" );
-        }
-
         if (!optXsltPath.length())
         {
             StringBuffer binXsltPath;
@@ -738,8 +729,8 @@ public:
 
     virtual int processCMD()
     {
-        cmdHelper.loadDefinition(optSource, optService, optVersion);
-        Owned<IEsdlDefObjectIterator> structs = cmdHelper.esdlDef->getDependencies( optService, optMethod, ESDLOPTLIST_DELIMITER, optVersion, NULL, optFlags );
+        cmdHelper.loadDefinition(optSource, optService, 0);
+        Owned<IEsdlDefObjectIterator> structs = cmdHelper.esdlDef->getDependencies( optService, optMethod, ESDLOPTLIST_DELIMITER, 0, NULL, optFlags );
 
         if(!optPreprocessOutputDir.isEmpty())
         {
@@ -768,7 +759,6 @@ public:
     void printOptions()
     {
         puts("Options:");
-        puts("  --version <version number> : Constrain to interface version");
         puts("  --method <method name>[;<method name>]* : Constrain to list of specific method(s)" );
         puts("  --xslt <xslt file path> : Path to xslt files used to transform EsdlDef to Java code" );
         puts("  --preprocess-output <raw output directory> : Output pre-processed xml file to specified directory before applying XSLT transform" );
@@ -798,7 +788,7 @@ public:
         StringBuffer xml;
 
         xml.appendf( "<esxdl name='%s'>", optService.get());
-        cmdHelper.defHelper->toXML( obj, xml, optVersion, NULL, optFlags );
+        cmdHelper.defHelper->toXML( obj, xml, 0, NULL, optFlags );
         xml.append("</esxdl>");
         saveAsFile(optPreprocessOutputDir, NULL, xml, NULL );
     }
@@ -836,8 +826,6 @@ public:
     StringAttr optXsltPath;
     StringAttr optMethod;
     StringAttr optPreprocessOutputDir;
-    StringAttr optVersionStr;
-    double optVersion;
     unsigned optFlags;
 
 protected:

+ 5 - 3
tools/esdlcmd/esdlcmd_shell.cpp

@@ -155,7 +155,7 @@ bool EsdlCMDShell::parseCommandLineOptions(ArgvIterator &iter)
             iter.next();
             break;
         }
-        if (iter.matchFlag(boolValue, "--version"))
+        if (iter.matchFlag(boolValue, ESDLOPT_VERSION))
         {
             fprintf(stdout, "%s\n", BUILD_TAG);
             return false;
@@ -180,7 +180,7 @@ bool EsdlCMDShell::parseCommandLineOptions(ArgvIterator &iter)
 void EsdlCMDShell::usage()
 {
     fprintf(stdout,"\nUsage:\n"
-        "    esdl [--version] <command> [<args>]\n\n"
+        "    esdl <command> [<args>]\n\n"
            "Commonly used commands:\n"
            "   xml               Generate XML from ESDL definition.\n"
            "   ecl               Generate ECL from ESDL definition.\n"
@@ -188,6 +188,7 @@ void EsdlCMDShell::usage()
            "   wsdl              Generate WSDL from ESDL definition.\n"
            "   publish           Publish ESDL Definition for ESP use.\n"
            "   list-definitions  List all ESDL definitions.\n"
+           "   get-definition    Get ESDL definition.\n"
            "   delete            Delete ESDL Definition.\n"
            "   bind-service      Configure ESDL based service on target ESP (with existing ESP Binding).\n"
            "   list-bindings     List all ESDL bindings.\n"
@@ -198,6 +199,7 @@ void EsdlCMDShell::usage()
            "   monitor           Generate ECL code for result monitoring / differencing\n"
            "   monitor-template  Generate a template for use with 'monitor' command\n"
            ""
-           "\nRun 'esdl help <command>' for more information on a specific command\n\n"
+           "\nRun 'esdl help <command>' for more information on a specific command\n"
+           "\nRun 'esdl --version' to get version information\n\n"
     );
 }