We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Build number in -dev versioning
Since we do not have a build number in the -dev version, it may be quite complex to understand which particular version of freqtrade the user runs (especially with that your conda). So if we change user interface I guess it's better for a while to make those changes along with changing the version of both develop and master...

Is it possible to introduce the build number into the -dev versioning, which will change with every merge, as ccxt employs, for example?

It's not necessary for master (2019-8 is completely enough), but for develop changing every day this may be useful since `freqtrade -V` will give particular version info (even when a user has current codebase from github fetched in a dir, but installed an outdated version with that your conda, which is used instead of latest develop from the dir; that's the confusing usecase when it's complicated to find out the actual version of freqtrade that runs at the user site...)

It's not necessary to be an increasing number, it can be a short commit id (merged into develop), for example...


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `freqtrade/__init__.py`
Content:
```
1 """ FreqTrade bot """
2 __version__ = '2019.7-dev'
3 
4 
5 class DependencyException(Exception):
6     """
7     Indicates that an assumed dependency is not met.
8     This could happen when there is currently not enough money on the account.
9     """
10 
11 
12 class OperationalException(Exception):
13     """
14     Requires manual intervention and will usually stop the bot.
15     This happens when an exchange returns an unexpected error during runtime
16     or given configuration is invalid.
17     """
18 
19 
20 class InvalidOrderException(Exception):
21     """
22     This is returned when the order is not valid. Example:
23     If stoploss on exchange order is hit, then trying to cancel the order
24     should return this exception.
25     """
26 
27 
28 class TemporaryError(Exception):
29     """
30     Temporary network or exchange related error.
31     This could happen when an exchange is congested, unavailable, or the user
32     has networking problems. Usually resolves itself after a time.
33     """
34
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py
--- a/freqtrade/__init__.py
+++ b/freqtrade/__init__.py
@@ -1,5 +1,16 @@
 """ FreqTrade bot """
-__version__ = '2019.7-dev'
+__version__ = 'develop'
+
+if __version__ == 'develop':
+
+    try:
+        import subprocess
+        __version__ = 'develop-' + subprocess.check_output(
+            ['git', 'log', '--format="%h"', '-n 1'],
+            stderr=subprocess.DEVNULL).decode("utf-8").rstrip().strip('"')
+    except Exception:
+        # git not available, ignore
+        pass
 
 
 class DependencyException(Exception):

{"golden_diff": "diff --git a/freqtrade/__init__.py b/freqtrade/__init__.py\n--- a/freqtrade/__init__.py\n+++ b/freqtrade/__init__.py\n@@ -1,5 +1,16 @@\n \"\"\" FreqTrade bot \"\"\"\n-__version__ = '2019.7-dev'\n+__version__ = 'develop'\n+\n+if __version__ == 'develop':\n+\n+    try:\n+        import subprocess\n+        __version__ = 'develop-' + subprocess.check_output(\n+            ['git', 'log', '--format=\"%h\"', '-n 1'],\n+            stderr=subprocess.DEVNULL).decode(\"utf-8\").rstrip().strip('\"')\n+    except Exception:\n+        # git not available, ignore\n+        pass\n \n \n class DependencyException(Exception):\n", "issue": "Build number in -dev versioning\nSince we do not have a build number in the -dev version, it may be quite complex to understand which particular version of freqtrade the user runs (especially with that your conda). So if we change user interface I guess it's better for a while to make those changes along with changing the version of both develop and master...\r\n\r\nIs it possible to introduce the build number into the -dev versioning, which will change with every merge, as ccxt employs, for example?\r\n\r\nIt's not necessary for master (2019-8 is completely enough), but for develop changing every day this may be useful since `freqtrade -V` will give particular version info (even when a user has current codebase from github fetched in a dir, but installed an outdated version with that your conda, which is used instead of latest develop from the dir; that's the confusing usecase when it's complicated to find out the actual version of freqtrade that runs at the user site...)\r\n\r\nIt's not necessary to be an increasing number, it can be a short commit id (merged into develop), for example...\r\n\n", "before_files": [{"content": "\"\"\" FreqTrade bot \"\"\"\n__version__ = '2019.7-dev'\n\n\nclass DependencyException(Exception):\n    \"\"\"\n    Indicates that an assumed dependency is not met.\n    This could happen when there is currently not enough money on the account.\n    \"\"\"\n\n\nclass OperationalException(Exception):\n    \"\"\"\n    Requires manual intervention and will usually stop the bot.\n    This happens when an exchange returns an unexpected error during runtime\n    or given configuration is invalid.\n    \"\"\"\n\n\nclass InvalidOrderException(Exception):\n    \"\"\"\n    This is returned when the order is not valid. Example:\n    If stoploss on exchange order is hit, then trying to cancel the order\n    should return this exception.\n    \"\"\"\n\n\nclass TemporaryError(Exception):\n    \"\"\"\n    Temporary network or exchange related error.\n    This could happen when an exchange is congested, unavailable, or the user\n    has networking problems. Usually resolves itself after a time.\n    \"\"\"\n", "path": "freqtrade/__init__.py"}], "after_files": [{"content": "\"\"\" FreqTrade bot \"\"\"\n__version__ = 'develop'\n\nif __version__ == 'develop':\n\n    try:\n        import subprocess\n        __version__ = 'develop-' + subprocess.check_output(\n            ['git', 'log', '--format=\"%h\"', '-n 1'],\n            stderr=subprocess.DEVNULL).decode(\"utf-8\").rstrip().strip('\"')\n    except Exception:\n        # git not available, ignore\n        pass\n\n\nclass DependencyException(Exception):\n    \"\"\"\n    Indicates that an assumed dependency is not met.\n    This could happen when there is currently not enough money on the account.\n    \"\"\"\n\n\nclass OperationalException(Exception):\n    \"\"\"\n    Requires manual intervention and will usually stop the bot.\n    This happens when an exchange returns an unexpected error during runtime\n    or given configuration is invalid.\n    \"\"\"\n\n\nclass InvalidOrderException(Exception):\n    \"\"\"\n    This is returned when the order is not valid. Example:\n    If stoploss on exchange order is hit, then trying to cancel the order\n    should return this exception.\n    \"\"\"\n\n\nclass TemporaryError(Exception):\n    \"\"\"\n    Temporary network or exchange related error.\n    This could happen when an exchange is congested, unavailable, or the user\n    has networking problems. Usually resolves itself after a time.\n    \"\"\"\n", "path": "freqtrade/__init__.py"}]}