manifestly 2.3.5 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/manifestly/cli.rb +15 -0
- data/lib/manifestly/repository.rb +9 -3
- data/lib/manifestly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50e16c5ca04e57fbe559ae1320d7be6ff4698657
|
4
|
+
data.tar.gz: 79b8b5a9fc98b0e7cd6e9aeb7f62c08e4a725f02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb5405e348c4476facc9462f6e03cedfeb994899c87c761363e49b38b93e5ea3d2eb73248fef0caf03370d11e5b1268cc5a7a95fed181d73fc8350795e9236f7
|
7
|
+
data.tar.gz: 04bcb082f5a1b47d55da807ccd10a8fe9d606c1c1e7820c2f7677a1301b38732d947f73069728631f81cacbe4bfd5fbbb9fdd65bf8cfb9eebacaefced5b31e12
|
data/lib/manifestly/cli.rb
CHANGED
@@ -326,6 +326,17 @@ module Manifestly
|
|
326
326
|
When you run this command, the tag is immediately pushed to the upstream
|
327
327
|
manifest repository.
|
328
328
|
|
329
|
+
Implementation note: if you look at the underlying git repository, you'll
|
330
|
+
see that tags are stored as the value you provided prepended with a
|
331
|
+
timestamp, some random characters (for uniqueness), and the filename
|
332
|
+
being tagged. These unique tags are never removed and are what are used
|
333
|
+
by Manifestly, e.g. in the `find` command. However, to make direct use
|
334
|
+
of the manifest repository easier, we also use moving tags that just
|
335
|
+
consist of the tag value you provide prepended by the filename being
|
336
|
+
tagged. Each time you put tag `blah` on a sha for a file `my.manifest`,
|
337
|
+
a `my.manifest/blah` tag will move to that sha in the underlying manifest
|
338
|
+
git repo.
|
339
|
+
|
329
340
|
#{Rainbow("Examples:").bright}
|
330
341
|
|
331
342
|
$> manifestly tag --repo=org/repo --sha=fe10b5fdb9 --tag=release-to-qa --message="howdy"
|
@@ -371,6 +382,10 @@ module Manifestly
|
|
371
382
|
You can limit the number of returned SHAs with the `--limit` flag.
|
372
383
|
Otherwise, all matching SHAs are returned.
|
373
384
|
|
385
|
+
Implementation note: only pays attention to the unique versions of tags
|
386
|
+
created through manifestly, not to the "plain" tags that exist to support
|
387
|
+
direct use of the manifest git repo.
|
388
|
+
|
374
389
|
#{Rainbow("Examples:").bright}
|
375
390
|
|
376
391
|
$> manifestly find --tag=release-to-qa --repo=org/some_repo --repo-file=foo\x5
|
@@ -192,15 +192,21 @@ module Manifestly
|
|
192
192
|
raise(ShaAlreadyTagged) if existing_shas.any?{|existing| existing.match(/#{options[:sha]}/)}
|
193
193
|
|
194
194
|
filename = get_commit_filename(options[:sha])
|
195
|
-
|
196
|
-
|
197
|
-
git.
|
195
|
+
|
196
|
+
plain_tag = "#{filename}/#{options[:tag]}"
|
197
|
+
git.add_tag(plain_tag, options[:sha], {annotate: true, message: options[:message], f: true})
|
198
|
+
git.push('origin', "refs/tags/#{plain_tag}", f: true) if options[:push]
|
199
|
+
|
200
|
+
unique_tag = "#{Time.now.utc.strftime("%Y%m%d-%H%M%S.%6N")}/#{::SecureRandom.hex(2)}/#{filename}/#{options[:tag]}"
|
201
|
+
git.add_tag(unique_tag, options[:sha], {annotate: true, message: options[:message], f: true})
|
202
|
+
git.push('origin', "refs/tags/#{unique_tag}", f: true) if options[:push]
|
198
203
|
end
|
199
204
|
|
200
205
|
def get_shas_with_tag(options={})
|
201
206
|
options[:file] ||= ".*"
|
202
207
|
options[:order] ||= :descending
|
203
208
|
|
209
|
+
# only look for the unique tags, not the plain ones
|
204
210
|
pattern = /.*\/#{options[:file]}\/#{options[:tag]}/
|
205
211
|
|
206
212
|
tag_objects = git.tags.select{|tag| tag.name.match(pattern)}
|
data/lib/manifestly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manifestly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|