Class: Dply::CodeArchive
- Inherits:
-
Object
- Object
- Dply::CodeArchive
- Includes:
- Helper
- Defined in:
- lib/dply/code_archive.rb
Instance Attribute Summary collapse
-
#branch ⇒ Object
readonly
Returns the value of attribute branch.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#skip_depcheck ⇒ Object
writeonly
Sets the attribute skip_depcheck.
Instance Method Summary collapse
- #build(git: true, gnu_tar: false, &block) ⇒ Object
-
#initialize(name, revision:) ⇒ CodeArchive
constructor
A new instance of CodeArchive.
Methods included from Helper
#cmd, #error, #git, #logger, #sh, #symlink
Constructor Details
#initialize(name, revision:) ⇒ CodeArchive
Returns a new instance of CodeArchive.
12 13 14 15 16 17 18 |
# File 'lib/dply/code_archive.rb', line 12 def initialize(name, revision:) @name = name @branch = get_branch @revision = revision @dir = "tmp/build_artifacts" validate end |
Instance Attribute Details
#branch ⇒ Object (readonly)
Returns the value of attribute branch.
9 10 11 |
# File 'lib/dply/code_archive.rb', line 9 def branch @branch end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/dply/code_archive.rb', line 9 def name @name end |
#skip_depcheck=(value) ⇒ Object (writeonly)
Sets the attribute skip_depcheck
10 11 12 |
# File 'lib/dply/code_archive.rb', line 10 def skip_depcheck=(value) @skip_depcheck = value end |
Instance Method Details
#build(git: true, gnu_tar: false, &block) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dply/code_archive.rb', line 20 def build(git: true, gnu_tar: false, &block) make_dir create_tar git, gnu_tar instance_eval &block if block add_git_commit_id add_revision add_archive_name depcheck compress end |