{"id":16813296,"url":"https://github.com/ivanvc/bob","last_synced_at":"2025-08-24T17:18:14.721Z","repository":{"id":1787095,"uuid":"2710972","full_name":"ivanvc/bob","owner":"ivanvc","description":"Bob The Builder","archived":false,"fork":false,"pushed_at":"2012-05-09T21:17:52.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T20:53:28.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"jpbatz/voggy","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanvc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-11-04T17:32:13.000Z","updated_at":"2014-04-07T13:22:30.000Z","dependencies_parsed_at":"2022-08-20T11:00:21.888Z","dependency_job_id":null,"html_url":"https://github.com/ivanvc/bob","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvc%2Fbob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvc%2Fbob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvc%2Fbob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanvc%2Fbob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanvc","download_url":"https://codeload.github.com/ivanvc/bob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244022659,"owners_count":20385136,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T10:25:58.365Z","updated_at":"2025-03-17T11:24:45.305Z","avatar_url":"https://github.com/ivanvc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bob The Builder\n\n\u003cp\u003e\u003cimg src=\"http://i.imgur.com/C7GBG.jpg\" alt=\"Bob The Builder\" title=\"Bob The Builder\" align=\"right\" style=\"padding-left: 10px\"\u003e\u003c/p\u003e\n\nBob The Builder is easy building and deploying applications.\n\n## Installation\n\nThis can be achieved by easily using RubyGems\n\n    $ gem install bob_the_builder\n\n## What to do after installation\n\nOnce it is installed, you can configure any project by running its handy tool, called ```bobify```. It receives only one argument, and it is the location of the application's folder. If you are inside it, you just need to do:\n\n    $ bobify .\n\nThis will generate a set of files, including a sample configuration YAML, and a couple sample scripts.\n\n## Configuration\n\nThere should be a file called ```script/config.yml```. The main idea is that it contains a set of variables, that can be overridden per environment in different ways. The precedence order is:\n\n1. Environment variables\n2. Git configuration variables\n3. YAML variable per environment\n4. YAML global variable\n\nConfiguration variables defined in the YAML can call to another variable. There's a set of needed variables, here's the basic set:\n\n```yaml\noutput: builds/my_output_v{{version}}_{{date}}.o\nbuild_command: {{gcc}} {{input}} -o {{output}}\nchanges_regexp: \"(Bug Fix|Improvement)\"\ngcc: /usr/bin/env gcc\ninput: src/input.c\n\ngithub:\n  username: my_github_username\n  password: mypassword\n  repo: ivanvc/bob\n\nproduction:\n  server: ivanvc@ec-12.compute1.amazonaws.com:/var/www/prod\n  output: builds/output_prod.o\ndaily_build:\n  server: ivanvc@ec-12.compute1.amazonaws.com:/var/www/daily\ndevelopment:\n  server: ivanvc@localhost:/Users/ivan/Sites/project\n  output: builds/output.o\n```\n\nHere are a couple of things demonstrated, a variable can request another one using a [mustache](http://mustache.github.com/) similar syntax. There are two **Magic Variables** ```date``` and ```version```. The first one is the date when the command was called, ehmmm, Today... And version is the one read from the latest git tag.\n\nAlso, the variables inside each environment (development, daily_build and production) override the ones at the root.\n\nIf you specify GitHub's credentials, you will be able to upload the latest version to a GitHub repo, directly to the downloads section.\n\n## Usage\n\nIn order to use Bob, you need to instantiate it, and do a build, deploy, version bump, etc. Here's a sample script:\n\n```ruby\n#!/usr/bin/env ruby\nrequire 'rubygems'\nrequire 'bob_the_builder'\ninclude BobTheBuilder\n\n# The first argument is the environment, matches the one from the config\n# file. It also takes two optional arguments, the directory where the git\n# repo is, defaults to '.'. The last one is the branch that bob should use\n# defaults to 'master'.\nbuilder = Bob.new('daily_build')\n\n# We don't want the daily build if there are no changes, or if the source\n# doesn't compiles.\nif builder.changes_since_last_version? \u0026\u0026 builder.build\n  # Bump the version 'patch', 'minor' or 'major'.\n  builder.version_bump! ARGV[0]\n  builder.build\n  # Deploy to the server, and to GitHub.\n  builder.deploy\n  builder.deploy 'github'\nend\n```\n\nThis is the sample for a daily building script, it can be found in the script folder, and to call it, you just need to do:\n\n    $ script/daily_build\n\nAnd to do a simple deploy, here's a sample script:\n\n```ruby\n#!/usr/bin/env ruby\nrequire 'rubygems'\nrequire 'bob_the_builder'\ninclude BobTheBuilder\n\n# The first argument is the environment, matches the one from the config\n# file. It also takes two optional arguments, the directory where the git\n# repo is, defaults to '.'. The last one is the branch that bob should use\n# defaults to 'master'.\nbuilder = Bob.new(ARGV[0] || 'development')\nbuilder.build\n# The deploy option has an optional argument, where this deploy should be\n# done. Defaults to 'server', but can be 'github'.\nbuilder.deploy\n```\n\nIn the latter, it initializes with the passed environment, i.e. ```script/deploy production``` will deploy and build using production settings.\n\nAs said before, any variable can be overridden using environment variables, let's say: ```OUTPUT=hello.o script/deploy development``` will use hello.o as the output instead of the stated in the configuration file.\n\n## License\n\nCopyright (c) 2011 Ivan Valdes (@ivanvc). See LICENSE.txt for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanvc%2Fbob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanvc%2Fbob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanvc%2Fbob/lists"}