Skip to content

Commit

Permalink
Merge pull request #98 from jamesiarmes/s3-artifact-prefix
Browse files Browse the repository at this point in the history
Added prefix for S3 artifact file name.
  • Loading branch information
askreet committed Jun 6, 2016
2 parents fb3200d + f80f594 commit 0857296
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/moonshot/artifact_repository/s3_bucket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ class Moonshot::ArtifactRepository::S3Bucket

attr_reader :bucket_name

def initialize(bucket_name)
def initialize(bucket_name, prefix: '')
@bucket_name = bucket_name
@prefix = prefix
end

def store_hook(build_mechanism, version_name)
Expand All @@ -32,7 +33,7 @@ def store_hook(build_mechanism, version_name)
end

def filename_for_version(version_name)
"#{version_name}.tar.gz"
"#{@prefix}#{version_name}.tar.gz"
end

private
Expand Down

0 comments on commit 0857296

Please sign in to comment.