Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am astrosilverio on github.
  • I am astrosilverio (https://keybase.io/astrosilverio) on keybase.
  • I have a public key ASCRz4YvQVKJ9Td_BcllRAGHvff5AL64I7ld1oCtzvIgDQo

To claim this, I am signing this object:

@astrosilverio
astrosilverio / bumpversion.sh
Last active February 14, 2016 18:21
bb's first bumpversion script
#!/bin/bash
#######################################
# Get which part of version to bump
#######################################
# if no version specified, bump bugfix
if [ -z "$*" ]; then BUMP_BUGFIX=1; fi
# if there are args, scan through them to get version to bump
class Entity(object):
def __init__(self, guid):
self.guid = guid
self.components = set()
def __getattr__(self, name):
# if Entity doesn't have an attribute, check if any of its components do
for component in self.components:
try:
attr = getattr(component, name)