kube_schema 1.12.0 → 2.0.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.
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require "erb"
5
- require_relative "../lib/kube/schema/version"
6
-
7
- USAGE = <<~TEXT
8
- Usage: bin/increment-version <major|minor|patch>
9
- TEXT
10
-
11
- segment = ARGV[0]
12
-
13
- unless %w[major minor patch].include?(segment)
14
- warn USAGE
15
- exit 1
16
- end
17
-
18
- current = Kube::Schema::VERSION
19
- major, minor, patch = current.split(".").map(&:to_i)
20
-
21
- case segment
22
- when "major"
23
- major += 1
24
- minor = 0
25
- patch = 0
26
- when "minor"
27
- minor += 1
28
- patch = 0
29
- when "patch"
30
- patch += 1
31
- end
32
-
33
- version = "#{major}.#{minor}.#{patch}"
34
-
35
- template_path = File.expand_path("../lib/kube/schema/version.rb.erb", __dir__)
36
- output_path = File.expand_path("../lib/kube/schema/version.rb", __dir__)
37
-
38
- template = ERB.new(File.read(template_path))
39
- result = template.result(binding)
40
-
41
- File.write(output_path, result)
42
-
43
- `bundle install`
44
-
45
- puts "#{current} -> #{version}"
data/bin/release-gem DELETED
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require_relative "../lib/kube/schema/version"
5
-
6
- local_version = Kube::Schema::VERSION
7
- gem_name = "kube_schema"
8
- gemspec = "kube_schema.gemspec"
9
-
10
- puts "Local version: #{local_version}"
11
-
12
- remote_output = `gem specification #{gem_name} version --remote 2>&1`
13
-
14
- if $?.success?
15
- remote_version = remote_output[/version: (.+)/, 1]&.strip
16
- puts "Remote version: #{remote_version}"
17
-
18
- if Gem::Version.new(local_version) <= Gem::Version.new(remote_version)
19
- abort "ERROR: Local version (#{local_version}) has not been incremented past remote (#{remote_version})"
20
- end
21
- else
22
- puts "Gem not yet published remotely, proceeding with first release"
23
- end
24
-
25
- puts "Building #{gemspec}..."
26
- system("gem build #{gemspec}") || abort("ERROR: gem build failed")
27
-
28
- gem_file = "#{gem_name}-#{local_version}.gem"
29
- puts "Pushing #{gem_file}..."
30
- system("gem push #{gem_file}") || abort("ERROR: gem push failed")
31
-
32
- puts "Released #{gem_name} #{local_version}"
data/bin/tag-version DELETED
@@ -1,19 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- require_relative "../lib/kube/schema/version"
5
-
6
- version = Kube::Schema::VERSION
7
- tag = "v#{version}"
8
-
9
- existing = `git tag -l #{tag}`.strip
10
- unless existing.empty?
11
- abort "ERROR: Tag #{tag} already exists"
12
- end
13
-
14
- system("git tag #{tag}") || abort("ERROR: Failed to create tag #{tag}")
15
-
16
- puts "Tagged #{tag}"
17
- puts ""
18
- puts "To push the tag, run:"
19
- puts " git push --tags"
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Kube
4
- module Schema
5
- VERSION = "<%= version %>"
6
- end
7
- end