Skip to content

Instantly share code, notes, and snippets.

@JSchaenzle
Last active August 29, 2015 14:02
Show Gist options
  • Select an option

  • Save JSchaenzle/835c1849d7d7382f7af4 to your computer and use it in GitHub Desktop.

Select an option

Save JSchaenzle/835c1849d7d7382f7af4 to your computer and use it in GitHub Desktop.

Revisions

  1. JSchaenzle revised this gist Jun 11, 2014. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions erb_foobar.rb
    Original file line number Diff line number Diff line change
    @@ -1,12 +1,10 @@
    def foobar

    hash = `git show --pretty=%h`.strip.upcase
    contents = <<-eof
    #ifndef VERSION_INFO_H
    #define VERSION_INFO_H
    #define CURRENT_GET_HASH "#{hash}"
    #endif
    eof

    puts contents

    end
  2. JSchaenzle created this gist Jun 11, 2014.
    12 changes: 12 additions & 0 deletions erb_foobar.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    def foobar

    contents = <<-eof
    #ifndef VERSION_INFO_H
    #define VERSION_INFO_H
    #define CURRENT_GET_HASH "#{hash}"
    #endif
    eof

    puts contents

    end