Publishing nanopb-0.4.0
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 898c376..3561325 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,4 +1,4 @@
-nanopb-0.4.0 (2019-12-xx)
+nanopb-0.4.0 (2019-12-20)
  New field descriptor format.
  Make nanopb_generator automatically compile .proto files (#462)
  Allow installing as Python package from pip (#460)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0d8f471..f93571a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,7 @@
 
 project(nanopb C)
 
-set(nanopb_VERSION_STRING nanopb-0.4.0-dev)
+set(nanopb_VERSION_STRING nanopb-0.4.0)
 set(nanopb_SOVERSION 0)
 
 string(REPLACE "nanopb-" "" nanopb_VERSION ${nanopb_VERSION_STRING})
diff --git a/conanfile.py b/conanfile.py
index 2089a38..03cd70d 100644
--- a/conanfile.py
+++ b/conanfile.py
@@ -3,7 +3,7 @@
 
 class NanoPbConan(ConanFile):
     name = "nanopb"
-    version = "0.4.0-dev"
+    version = "0.4.0"
     license = "zlib"
     url = "https://jpa.kapsi.fi/nanopb/"
     description = "Protocol Buffers with small code size"
diff --git a/extra/poetry/pyproject.toml b/extra/poetry/pyproject.toml
index 5b33dfe..9c61220 100644
--- a/extra/poetry/pyproject.toml
+++ b/extra/poetry/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "nanopb"
-version = "0.4.0-dev"
+version = "0.4.0"
 description = "Nanopb is a small code-size Protocol Buffers implementation in ansi C. It is especially suitable for use in microcontrollers, but fits any memory restricted system."
 authors = ["Petteri Aimonen <jpa@npb.mail.kapsi.fi>"]
 license = "Zlib"
diff --git a/generator/nanopb_generator.py b/generator/nanopb_generator.py
index ead8765..6132f87 100755
--- a/generator/nanopb_generator.py
+++ b/generator/nanopb_generator.py
@@ -4,7 +4,7 @@
 from __future__ import unicode_literals
 
 '''Generate header file for nanopb from a ProtoBuf FileDescriptorSet.'''
-nanopb_version = "nanopb-0.4.0-dev"
+nanopb_version = "nanopb-0.4.0"
 
 import sys
 import re
diff --git a/library.json b/library.json
index 0a6e5ba..1640503 100644
--- a/library.json
+++ b/library.json
@@ -1,8 +1,8 @@
 {
   "name": "Nanopb",
-  "version": "0.3.9.2",
+  "version": "0.4.0",
   "keywords": "protocol buffers, protobuf, google",
-  "description": "Nanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32 bit microcontrollers, but is also fit for other embedded systems with tight (2-10 kB ROM, <1 kB RAM) memory constraints.",
+  "description": "Nanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32 bit microcontrollers, but is also fit for other embedded systems with tight (<10 kB ROM, <1 kB RAM) memory constraints.",
   "repository": {
     "type": "git",
     "url": "https://github.com/nanopb/nanopb.git"
diff --git a/pb.h b/pb.h
index bd95920..8b59b0c 100644
--- a/pb.h
+++ b/pb.h
@@ -61,7 +61,7 @@
 
 /* Version of the nanopb library. Just in case you want to check it in
  * your own program. */
-#define NANOPB_VERSION nanopb-0.4.0-dev
+#define NANOPB_VERSION nanopb-0.4.0
 
 /* Include all the system headers needed by nanopb. You will need the
  * definitions of the following:
diff --git a/tools/set_version.sh b/tools/set_version.sh
index ef8b312..6000619 100755
--- a/tools/set_version.sh
+++ b/tools/set_version.sh
@@ -14,4 +14,4 @@
 fi
 
 sed -i -e 's/version =.*/version = "'$VERSION_ONLY'"/' conanfile.py
-sed -i -e 's/version =.*/version = "'$VERSION_ONLY'"/' extra/poetry/pyproject.toml
+sed -i -e 's/^version =.*/version = "'$VERSION_ONLY'"/' extra/poetry/pyproject.toml