Class: TYCiCore::RepoReleaseConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/tuya/ci/core/spec/release/repo_release.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(module_name, version, project_github, base_branch) ⇒ RepoReleaseConfig

Returns a new instance of RepoReleaseConfig.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 44

def initialize(module_name, version, project_github, base_branch)

	@path = "#{ENV['HOME']}/.cocoapods/repos/TYSpecs/Specs/#{module_name}/#{version}/"

	@podspec = "#{path}#{module_name}.podspec"
	if version.split('.').size == 4
		@podspec = "#{path}#{module_name}.podspec.json"
	end

	@project = module_name
	@version = version

	@project_github_name = project_github
	@project_github_url = "https://github.com/TuyaInc/#{project_github}.git"
	@base_branch = base_branch
end

Instance Attribute Details

#base_branchObject

Returns the value of attribute base_branch.



43
44
45
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 43

def base_branch
  @base_branch
end

#pathObject

Returns the value of attribute path.



42
43
44
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 42

def path
  @path
end

#podspecObject

Returns the value of attribute podspec.



42
43
44
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 42

def podspec
  @podspec
end

#projectObject

Returns the value of attribute project.



42
43
44
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 42

def project
  @project
end

#project_github_nameObject

Returns the value of attribute project_github_name.



43
44
45
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 43

def project_github_name
  @project_github_name
end

#project_github_urlObject

Returns the value of attribute project_github_url.



43
44
45
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 43

def project_github_url
  @project_github_url
end

#versionObject

Returns the value of attribute version.



42
43
44
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 42

def version
  @version
end

Instance Method Details

#readyObject



61
62
63
# File 'lib/tuya/ci/core/spec/release/repo_release.rb', line 61

def ready
	puts "Release #{@project} : #{@version}, path : #{@path}".yellow
end