{"id":931,"date":"2019-03-13T14:13:22","date_gmt":"2019-03-13T11:13:22","guid":{"rendered":"https:\/\/artem.services\/?p=898"},"modified":"2019-03-17T17:29:41","modified_gmt":"2019-03-17T14:29:41","slug":"fastlane-badge-2","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=931&lang=en","title":{"rendered":"Fastlane &#8212; Badge for iOS"},"content":{"rendered":"<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">The <\/span><\/span> <a href=\"https:\/\/docs.fastlane.tools\/actions\/badge\/\" target=\"_blank\" rel=\"noopener noreferrer\">Badge<\/a> <span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\"> plugin for Fastlane allows you to offer version numbers, release type, etc.<\/span><\/span><\/p>\n<p><img loading=\"lazy\" class=\"size-full wp-image-927 aligncenter\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/03\/fastlane-badge-ios-example.jpg\" alt=\"\" width=\"326\" height=\"142\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2019\/03\/fastlane-badge-ios-example.jpg 326w, https:\/\/artem.services\/wp-content\/uploads\/2019\/03\/fastlane-badge-ios-example-300x131.jpg 300w\" sizes=\"(max-width: 326px) 100vw, 326px\" \/><\/p>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">On the <strong>MacOS<\/strong> collector, install the dependencies:<\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nbrew install librsvg\r\nbrew install imagemagick\r\nbrew install graphicsmagick\r\n<\/pre>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">Add a line to the project <strong>Gemfile<\/strong>:<\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ngem 'fastlane-plugin-badge'\r\n<\/pre>\n<p><span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">Add a block related to the <strong>badge<\/strong> to <strong>Fastfile<\/strong> and add the version number via a variable.<\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\njenkinsVersionNumber = ENV[&quot;APP_VERSION&quot;]\r\n\r\n...\r\n\r\nlane :adhoc do\r\n  add_badge(\r\n    alpha: true,\r\n    dark: true,\r\n    shield: &quot;Version-#{jenkinsVersionNumber}-orange&quot;,\r\n    grayscale: true\r\n  )\r\n\r\n...\r\nend\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Badge plugin for Fastlane allows you to offer version numbers, release type, etc. On the MacOS collector, install the dependencies: Add a line to the project Gemfile: Add a block related to the badge to Fastfile and add the version number via a variable. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[613],"tags":[671,615,363,673,617],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/931"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=931"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/931\/revisions"}],"predecessor-version":[{"id":933,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/931\/revisions\/933"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=931"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=931"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=931"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}