{"id":1770,"date":"2015-02-09T08:00:30","date_gmt":"2015-02-09T08:00:30","guid":{"rendered":"http:\/\/www.diogonunes.com\/blog\/?p=1770"},"modified":"2020-05-15T14:23:50","modified_gmt":"2020-05-15T13:23:50","slug":"embed-svns-revision-into-assemblyinfos-version-number","status":"publish","type":"post","link":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/","title":{"rendered":"Embed SVN&#8217;s revision into AssemblyInfo&#8217;s version number"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio-400x229.png?resize=400%2C229\" alt=\"tortoise-visualstudio\" width=\"400\" height=\"229\" class=\"aligncenter size-medium wp-image-1773\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?resize=400%2C229&amp;ssl=1 400w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?w=640&amp;ssl=1 640w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<h3>Automatically sync the two numbers on each build.<\/h3>\n<p><!--more--><\/p>\n<p>Recall that version numbers are of the form <code>Major.Minor.BuildDay.BuildTime<\/code>. For quite some time I used <strong>Visual Studio&#8217;s auto-generated build numbers<\/strong>. Basically you <a href=\"http:\/\/stackoverflow.com\/a\/356694\/675577\">edit your project&#8217;s AssemblyVersion.cs<\/a> to <code>[assembly : AssemblyVersion(\"X.Y.*\")]<\/code> and, every time you build your project, your binaries get stamped with a version number of the form <code>1.0.5457.29870<\/code>.<\/p>\n<p>Those last two numbers are <a href=\"http:\/\/stackoverflow.com\/a\/826850\/675577\">generated according to the time of the build<\/a> &#8212; the first is related with the day of build (<em>the number of days since the year 2000<\/em>) and the second with the time of the build (the number of seconds since last midnight). Setting only the last to be * can be bad &#8212; if you built the solution late in a day and early in the following day, the later build would have an earlier version number. <em>I recommend always using<\/em> <code>X.Y.*<\/code> <em>instead of<\/em> <code>X.Y.Z.*<\/code> because your version number will ALWAYS increase this way.<\/p>\n<p>However when you have to deliver new binaries on a daily basis, these <del>random<\/del> generated numbers provide little information other than a sequence. Imagine your client screaming that the version <code>1.0.5457.29870<\/code> doesn&#8217;t work. How are you going to figure out which source code (or SVN release) generated that binary?<\/p>\n<p><strong>The solution is to embed SVN&#8217;s revision number into your binaries&#8217; version number.<\/strong> That way, when you check the version number of an executable you immediately know which SVN commit was used to build that binary. The steps are quite easy:<\/p>\n<ol>\n<li>\n<p>Copy your existing <code>AssemblyInfo.cs<\/code> file into a file named <code>AssemblyInfo_template.cs<\/code>. This will become our <em>template file<\/em>, used by Visual Studio&#8217;s version generator.<\/p>\n<\/li>\n<li>\n<p>Add <code>AssemblyInfo.cs<\/code> to SVN&#8217;s ignore list. This file will be generated\/ovewritten everytime you rebuild your solution.<\/p>\n<\/li>\n<li>\n<p>In the new <code>AssemblyInfo_template.cs<\/code> file edit the AssemblyVersion with the desired <a href=\"http:\/\/tortoisesvn.net\/node\/18\">SubWCRev.exe keywords<\/a>. Recall that version numbers are of the form <code>Major.Minor.BuildDay.BuildTime<\/code>. In my case I wanted the Major number to be set manually, the Minor number to be automatically set by SVN&#8217;s revision, and the last two dynamically generated by Visual Studio. Therefore, I edited <code>[assembly : AssemblyVersion(\"1.0.0.0\")]<\/code> to <code>[assembly: AssemblyVersion(\"2.$WCREV$.*\")]<\/code><\/p>\n<\/li>\n<li>\n<p>If you want the FileVersion to be the same as the AssemblyVersion, just delete the FileVersion entry.<\/p>\n<\/li>\n<li>\n<p>Finally we need to tell Visual Studio to generate the AssemblyInfo.cs on every build event. Right-click your project and select &#8220;Properties&#8221;. Then select the &#8220;Build Events&#8221; tab and in the &#8220;Pre-build event command line&#8221; type the following command below.<\/p>\n<\/li>\n<\/ol>\n<p>The first part should be the fullpath to your SubWCRev executable. The first parameter is the working copy path, the second is the source file containing the keywords (our template file) and the third is the destination file (the &#8220;compiled&#8221; AssemblyInfo.cs).<\/p>\n<pre><code>\"C:\\Program Files\\TortoiseSVN\\bin\\SubWCRev.exe\" $(ProjectDir). $(ProjectDir)Properties\\AssemblyInfo_template.cs $(ProjectDir)Properties\\AssemblyInfo.cs\n<\/code><\/pre>\n<p>WARNING: Do not add the <code>AssemblyInfo_template.cs<\/code> to your Visual Studio project. If you do, you&#8217;ll have compilation errors about duplicated attributes! However, do add <code>AssemblyInfo_template.cs<\/code> to your SVN repository.<\/p>\n<h3>To sum it up<\/h3>\n<p><strong>Everytime you rebuild your project, Visual Studio will embed the most recent SVN&#8217;s revision number in your binaries&#8217; version number<\/strong>. Don&#8217;t forget to commit your changes before rebuilding your project, so that your file&#8217;s version match SVN&#8217;s revision number. Also note that a build won&#8217;t update AssemblyInfo.cs, for that you need a rebuild.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Automatically sync the two numbers on each build.<\/p>\n","protected":false},"author":1,"featured_media":1773,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[47,29,31],"class_list":["post-1770","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-c-sharp","tag-coding","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Embed SVN&#039;s revision into AssemblyInfo&#039;s version number - The Geeky Gecko<\/title>\n<meta name=\"description\" content=\"When daily delivering binaries, you must embed SVN&#039;s revision number into your binaries&#039; version number. TortoiseSVN and Visual Studio do the work for you.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Embed SVN&#039;s revision into AssemblyInfo&#039;s version number - The Geeky Gecko\" \/>\n<meta property=\"og:description\" content=\"When daily delivering binaries, you must embed SVN&#039;s revision number into your binaries&#039; version number. TortoiseSVN and Visual Studio do the work for you.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\" \/>\n<meta property=\"og:site_name\" content=\"The Geeky Gecko\" \/>\n<meta property=\"article:published_time\" content=\"2015-02-09T08:00:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-15T13:23:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"367\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Diogo Nunes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:site\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diogo Nunes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\"},\"author\":{\"name\":\"Diogo Nunes\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"headline\":\"Embed SVN&#8217;s revision into AssemblyInfo&#8217;s version number\",\"datePublished\":\"2015-02-09T08:00:30+00:00\",\"dateModified\":\"2020-05-15T13:23:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\"},\"wordCount\":535,\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1\",\"keywords\":[\"c#\",\"coding\",\"tutorial\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\",\"name\":\"Embed SVN's revision into AssemblyInfo's version number - The Geeky Gecko\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1\",\"datePublished\":\"2015-02-09T08:00:30+00:00\",\"dateModified\":\"2020-05-15T13:23:50+00:00\",\"description\":\"When daily delivering binaries, you must embed SVN's revision number into your binaries' version number. TortoiseSVN and Visual Studio do the work for you.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1\",\"width\":640,\"height\":367},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.diogonunes.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Embed SVN&#8217;s revision into AssemblyInfo&#8217;s version number\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/\",\"name\":\"The Geeky Gecko\",\"description\":\"The Geeky Gecko\",\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\",\"name\":\"Diogo Nunes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"width\":799,\"height\":799,\"caption\":\"Diogo Nunes\"},\"logo\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.diogonunes.com\",\"https:\/\/x.com\/dialexnunes\"],\"url\":\"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Embed SVN's revision into AssemblyInfo's version number - The Geeky Gecko","description":"When daily delivering binaries, you must embed SVN's revision number into your binaries' version number. TortoiseSVN and Visual Studio do the work for you.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/","og_locale":"en_US","og_type":"article","og_title":"Embed SVN's revision into AssemblyInfo's version number - The Geeky Gecko","og_description":"When daily delivering binaries, you must embed SVN's revision number into your binaries' version number. TortoiseSVN and Visual Studio do the work for you.","og_url":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/","og_site_name":"The Geeky Gecko","article_published_time":"2015-02-09T08:00:30+00:00","article_modified_time":"2020-05-15T13:23:50+00:00","og_image":[{"width":640,"height":367,"url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1","type":"image\/png"}],"author":"Diogo Nunes","twitter_card":"summary_large_image","twitter_creator":"@dialexnunes","twitter_site":"@dialexnunes","twitter_misc":{"Written by":"Diogo Nunes","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#article","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/"},"author":{"name":"Diogo Nunes","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"headline":"Embed SVN&#8217;s revision into AssemblyInfo&#8217;s version number","datePublished":"2015-02-09T08:00:30+00:00","dateModified":"2020-05-15T13:23:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/"},"wordCount":535,"publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1","keywords":["c#","coding","tutorial"],"articleSection":["Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/","url":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/","name":"Embed SVN's revision into AssemblyInfo's version number - The Geeky Gecko","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1","datePublished":"2015-02-09T08:00:30+00:00","dateModified":"2020-05-15T13:23:50+00:00","description":"When daily delivering binaries, you must embed SVN's revision number into your binaries' version number. TortoiseSVN and Visual Studio do the work for you.","breadcrumb":{"@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#primaryimage","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1","width":640,"height":367},{"@type":"BreadcrumbList","@id":"https:\/\/www.diogonunes.com\/blog\/embed-svns-revision-into-assemblyinfos-version-number\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.diogonunes.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Embed SVN&#8217;s revision into AssemblyInfo&#8217;s version number"}]},{"@type":"WebSite","@id":"https:\/\/www.diogonunes.com\/blog\/#website","url":"https:\/\/www.diogonunes.com\/blog\/","name":"The Geeky Gecko","description":"The Geeky Gecko","publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c","name":"Diogo Nunes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","width":799,"height":799,"caption":"Diogo Nunes"},"logo":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.diogonunes.com","https:\/\/x.com\/dialexnunes"],"url":"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/12\/tortoise-visualstudio.png?fit=640%2C367&ssl=1","jetpack-related-posts":[{"id":2047,"url":"https:\/\/www.diogonunes.com\/blog\/personality-test-to-build-better-teams\/","url_meta":{"origin":1770,"position":0},"title":"Personality test for better teams","author":"Diogo Nunes","date":"1 June, 2015","format":false,"excerpt":"It's not who you are, but how you fit in a team. While applying to a job position I once had to complete a personality test. I had done similar tests when I was younger. I even ventured to the world of Numerology. But this test was no bullsh!t. The\u2026","rel":"","context":"In &quot;Work&quot;","block_context":{"text":"Work","link":"https:\/\/www.diogonunes.com\/blog\/category\/work\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/ImitateFacialExpressions_122712-617x416.jpg?fit=617%2C416&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/ImitateFacialExpressions_122712-617x416.jpg?fit=617%2C416&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/04\/ImitateFacialExpressions_122712-617x416.jpg?fit=617%2C416&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":442,"url":"https:\/\/www.diogonunes.com\/blog\/upgrading-your-play-app-to-a-newer-version\/","url_meta":{"origin":1770,"position":1},"title":"Upgrading your Play app to a newer version","author":"Diogo Nunes","date":"31 March, 2014","format":false,"excerpt":"Let's assume you have an existing app using Play! 2.1.A and a 2.1.B version was released. You want to update your environment to use that new release. Note: This tutorial was tested to be working with 2.1.* versions; A and B are two arbitrary numbers. Updating environment Like when installing\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/03\/lets-play-2.png?fit=1143%2C431&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/03\/lets-play-2.png?fit=1143%2C431&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/03\/lets-play-2.png?fit=1143%2C431&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/03\/lets-play-2.png?fit=1143%2C431&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2014\/03\/lets-play-2.png?fit=1143%2C431&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2379,"url":"https:\/\/www.diogonunes.com\/blog\/custom-build-configurations-visualstudio\/","url_meta":{"origin":1770,"position":2},"title":"Custom build configurations on VisualStudio","author":"Diogo Nunes","date":"6 July, 2015","format":false,"excerpt":"Sometimes you might need your application to behave differently according to different clients, or different operating systems, or any other criterion. You could create global variables, initialize them on your application's startup, and scatter if statements over your code. What you should do is use the \"State\" design pattern instead,\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/07\/conditional-build.png?fit=1103%2C418&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2307,"url":"https:\/\/www.diogonunes.com\/blog\/create-update-and-merge-branches-svn\/","url_meta":{"origin":1770,"position":3},"title":"Create, update and merge branches in SVN","author":"Diogo Nunes","date":"25 May, 2015","format":false,"excerpt":"If you don't know what branches are and why they're used for, read this first. Creation First make sure your project follows the standard SVN folder structure, i.e. the trunk, tags and branches folders. All your code, resources, dependencies, and everything else you might need to compile a version of\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/05\/delete-old-git-branches-already-merged-into-master.jpeg?fit=1000%2C600&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/05\/delete-old-git-branches-already-merged-into-master.jpeg?fit=1000%2C600&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/05\/delete-old-git-branches-already-merged-into-master.jpeg?fit=1000%2C600&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2015\/05\/delete-old-git-branches-already-merged-into-master.jpeg?fit=1000%2C600&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2724,"url":"https:\/\/www.diogonunes.com\/blog\/particle-internet-button-overview\/","url_meta":{"origin":1770,"position":4},"title":"Internet Button by Particle: an overview","author":"Diogo Nunes","date":"26 September, 2016","format":false,"excerpt":"What it is The Internet Button contains a lot of useful hardware in a quite compact package. This is what it includes: Photon (the brain) with wifi access 11 bright RGB LEDs 4 physical buttons Sound speaker Accelerometer Plastic cover USB cable Particle's swag sticker :) How it works While\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/internetbuttondiagram-1.jpg?fit=1102%2C735&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/internetbuttondiagram-1.jpg?fit=1102%2C735&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/internetbuttondiagram-1.jpg?fit=1102%2C735&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/internetbuttondiagram-1.jpg?fit=1102%2C735&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2016\/08\/internetbuttondiagram-1.jpg?fit=1102%2C735&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3702,"url":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/","url_meta":{"origin":1770,"position":5},"title":"How to build a Docker image ready to run Cypress tests","author":"Diogo Nunes","date":"11 May, 2020","format":false,"excerpt":"My team decided to build a Docker image that contained Cypress, dependencies and all our end-to-end (E2E) tests. That way, anyone could simply pull the image and with a single command it was ready to run tests. Also, the developers and the CI pipeline we both using the same image,\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=1200%2C488&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=1200%2C488&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=1200%2C488&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=1200%2C488&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=1200%2C488&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/1770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/comments?post=1770"}],"version-history":[{"count":1,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/1770\/revisions"}],"predecessor-version":[{"id":3815,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/1770\/revisions\/3815"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media\/1773"}],"wp:attachment":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media?parent=1770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/categories?post=1770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/tags?post=1770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}