tayo 0.1.1 โ 0.1.2
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/tayo/commands/cf.rb +35 -0
- data/lib/tayo/commands/gh.rb +35 -0
- data/lib/tayo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fb563184d8cdc3604a22b5a7e566323be52debec46a27de32498a0010956fd2
|
4
|
+
data.tar.gz: 3ad939c3ea0d3fb39a80f73b47f8d97c38dd7afc8824193c83ce80b1505c732e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cc902680a9c59206a13ecbb2d41def76791c3b84aea5d206de7d0e8e811b838c15a1aa011ce78704f8b540849be903b51a111dd0807f1626fb807ff4b6b9a42
|
7
|
+
data.tar.gz: 98db75a9e76bd854c708f48376508edbd7d44481500cef21ac98fd3ca4555496f412729cd48d432b7f859737776070949d2d223a5bd8960851f347bfe80392f7
|
data/lib/tayo/commands/cf.rb
CHANGED
@@ -39,6 +39,9 @@ module Tayo
|
|
39
39
|
update_deploy_config(domain_info)
|
40
40
|
|
41
41
|
puts "\n๐ Cloudflare DNS ์ค์ ์ด ์๋ฃ๋์์ต๋๋ค!".colorize(:green)
|
42
|
+
|
43
|
+
# ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ
|
44
|
+
commit_cloudflare_changes(domain_info)
|
42
45
|
end
|
43
46
|
|
44
47
|
private
|
@@ -385,6 +388,38 @@ module Tayo
|
|
385
388
|
puts " servers.web: #{@server_info}".colorize(:gray)
|
386
389
|
puts " ssh.user: #{@ssh_user}".colorize(:gray) if @ssh_user && @ssh_user != "root"
|
387
390
|
end
|
391
|
+
|
392
|
+
def commit_cloudflare_changes(domain_info)
|
393
|
+
puts "\n๐ ๋ณ๊ฒฝ์ฌํญ์ Git์ ์ปค๋ฐํฉ๋๋ค...".colorize(:yellow)
|
394
|
+
|
395
|
+
# ๋ณ๊ฒฝ๋ ํ์ผ์ด ์๋์ง ํ์ธ
|
396
|
+
status_output = `git status --porcelain`.strip
|
397
|
+
|
398
|
+
if status_output.empty?
|
399
|
+
puts "โน๏ธ ์ปค๋ฐํ ๋ณ๊ฒฝ์ฌํญ์ด ์์ต๋๋ค.".colorize(:yellow)
|
400
|
+
return
|
401
|
+
end
|
402
|
+
|
403
|
+
# Git add
|
404
|
+
system("git add -A")
|
405
|
+
|
406
|
+
# Commit ๋ฉ์์ง ์์ฑ
|
407
|
+
commit_message = "Configure Cloudflare DNS settings\n\n- Setup DNS for domain: #{domain_info[:domain]}\n- Configure server IP: #{domain_info[:server_ip]}\n- Update deployment configuration\n- Add proxy host settings\n\n๐ค Generated with Tayo"
|
408
|
+
|
409
|
+
# Commit ์คํ
|
410
|
+
if system("git commit -m \"#{commit_message}\"")
|
411
|
+
puts "โ
๋ณ๊ฒฝ์ฌํญ์ด ์ฑ๊ณต์ ์ผ๋ก ์ปค๋ฐ๋์์ต๋๋ค.".colorize(:green)
|
412
|
+
|
413
|
+
# GitHub์ ํธ์
|
414
|
+
if system("git push", out: File::NULL, err: File::NULL)
|
415
|
+
puts "โ
๋ณ๊ฒฝ์ฌํญ์ด GitHub์ ํธ์๋์์ต๋๋ค.".colorize(:green)
|
416
|
+
else
|
417
|
+
puts "โ ๏ธ GitHub ํธ์์ ์คํจํ์ต๋๋ค. ์๋์ผ๋ก 'git push'๋ฅผ ์คํํด์ฃผ์ธ์.".colorize(:yellow)
|
418
|
+
end
|
419
|
+
else
|
420
|
+
puts "โ Git ์ปค๋ฐ์ ์คํจํ์ต๋๋ค.".colorize(:red)
|
421
|
+
end
|
422
|
+
end
|
388
423
|
end
|
389
424
|
end
|
390
425
|
end
|
data/lib/tayo/commands/gh.rb
CHANGED
@@ -43,6 +43,9 @@ module Tayo
|
|
43
43
|
puts "โข GitHub ์ ์ฅ์: https://github.com/#{@username}/#{@repo_name}".colorize(:cyan)
|
44
44
|
puts "โข Container Registry: #{@registry_url}".colorize(:cyan)
|
45
45
|
puts "โข ๋ฐฐํฌ ์ค์ : config/deploy.yml".colorize(:cyan)
|
46
|
+
|
47
|
+
# ๋ณ๊ฒฝ์ฌํญ ์ปค๋ฐ
|
48
|
+
commit_github_changes
|
46
49
|
end
|
47
50
|
|
48
51
|
private
|
@@ -384,6 +387,38 @@ module Tayo
|
|
384
387
|
File.write("config/deploy.yml", deploy_config.to_yaml)
|
385
388
|
puts " โ ๏ธ ์๋ฒ ์ ๋ณด์ ํ๊ฒฝ ๋ณ์๋ฅผ ์ค์ ํด์ฃผ์ธ์.".colorize(:yellow)
|
386
389
|
end
|
390
|
+
|
391
|
+
def commit_github_changes
|
392
|
+
puts "\n๐ ๋ณ๊ฒฝ์ฌํญ์ Git์ ์ปค๋ฐํฉ๋๋ค...".colorize(:yellow)
|
393
|
+
|
394
|
+
# ๋ณ๊ฒฝ๋ ํ์ผ์ด ์๋์ง ํ์ธ
|
395
|
+
status_output = `git status --porcelain`.strip
|
396
|
+
|
397
|
+
if status_output.empty?
|
398
|
+
puts "โน๏ธ ์ปค๋ฐํ ๋ณ๊ฒฝ์ฌํญ์ด ์์ต๋๋ค.".colorize(:yellow)
|
399
|
+
return
|
400
|
+
end
|
401
|
+
|
402
|
+
# Git add
|
403
|
+
system("git add -A")
|
404
|
+
|
405
|
+
# Commit ๋ฉ์์ง ์์ฑ
|
406
|
+
commit_message = "Add GitHub Container Registry configuration\n\n- Setup GitHub repository: #{@repo_name}\n- Configure container registry: #{@registry_url}\n- Add deployment configuration files\n- Setup environment variables\n\n๐ค Generated with Tayo"
|
407
|
+
|
408
|
+
# Commit ์คํ
|
409
|
+
if system("git commit -m \"#{commit_message}\"")
|
410
|
+
puts "โ
๋ณ๊ฒฝ์ฌํญ์ด ์ฑ๊ณต์ ์ผ๋ก ์ปค๋ฐ๋์์ต๋๋ค.".colorize(:green)
|
411
|
+
|
412
|
+
# GitHub์ ํธ์
|
413
|
+
if system("git push", out: File::NULL, err: File::NULL)
|
414
|
+
puts "โ
๋ณ๊ฒฝ์ฌํญ์ด GitHub์ ํธ์๋์์ต๋๋ค.".colorize(:green)
|
415
|
+
else
|
416
|
+
puts "โ ๏ธ GitHub ํธ์์ ์คํจํ์ต๋๋ค. ์๋์ผ๋ก 'git push'๋ฅผ ์คํํด์ฃผ์ธ์.".colorize(:yellow)
|
417
|
+
end
|
418
|
+
else
|
419
|
+
puts "โ Git ์ปค๋ฐ์ ์คํจํ์ต๋๋ค.".colorize(:red)
|
420
|
+
end
|
421
|
+
end
|
387
422
|
end
|
388
423
|
end
|
389
424
|
end
|
data/lib/tayo/version.rb
CHANGED