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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 53130b0f5947fd77184352fcdf0a77f95c63354b4b1156c9d52ae4e3f9487645
4
- data.tar.gz: b1361c9b598ccbd2909eb63149892e9d8c5f490365d6ef24ddcb0db93fe2c2cc
3
+ metadata.gz: 1fb563184d8cdc3604a22b5a7e566323be52debec46a27de32498a0010956fd2
4
+ data.tar.gz: 3ad939c3ea0d3fb39a80f73b47f8d97c38dd7afc8824193c83ce80b1505c732e
5
5
  SHA512:
6
- metadata.gz: 07f29a987b027a5f3e2dcb799bc9d4b36a0810368d77e44be158f60604d5c6ef19981099696d6ce8c6b3d16a114c2fa0a679ec6c2d6ea753532a5b64803de07f
7
- data.tar.gz: eae92807061aaafcaae98c2c01b5fd0c3afd2813bcf9ff366c745f8483bdf2473ae707b4ee38f9148205df8e0ae21540a5b56e15631cd6745a52b2d8c125b63a
6
+ metadata.gz: 5cc902680a9c59206a13ecbb2d41def76791c3b84aea5d206de7d0e8e811b838c15a1aa011ce78704f8b540849be903b51a111dd0807f1626fb807ff4b6b9a42
7
+ data.tar.gz: 98db75a9e76bd854c708f48376508edbd7d44481500cef21ac98fd3ca4555496f412729cd48d432b7f859737776070949d2d223a5bd8960851f347bfe80392f7
@@ -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
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tayo
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tayo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ์ด์›์„ญwonsup Lee/Alfonso