souls 1.6.11 → 1.6.15

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: 9cda650024d8bfad36aa09580eb77b9906cb7018f439cc4a38972df53370a9cc
4
- data.tar.gz: 513b8be99b2b0413e6fd61bbf32a2c6fd9a1b594066d7fee582e8c7959cf0e7f
3
+ metadata.gz: d3f025bcadbd709efbfe575c70bd72c7d097afe3f3ffff21afb6eed5ce7ff6a4
4
+ data.tar.gz: 38abcac4ffeca852239ebc179c3384638525c46cea878753d79e2a620364ca68
5
5
  SHA512:
6
- metadata.gz: 3eeb9ad75e81304efd6bbad45948cdc18e85c8dfdb4a7e6f0d2d5334b712c3e35cdb097a5e8fdfb6fe1bae4202f1a9af85a1ca3f2a91882fa997078dd5569536
7
- data.tar.gz: a5881285cd642596d676d4829597c2a040b91956a85531ce87077c60f06a6a7065477237ce8db11905a4547ecfde6627c2e914fb23128ec0f117862bd184baec
6
+ metadata.gz: bfce0b57fd661955b8d0ee99b9ddcf4b6dbd3a28e856177c5825d9da62980a6cfdd35e3001b01e280a47966ee18ce89845c2023bc6f9e0d96851547e68db332e
7
+ data.tar.gz: 6ec755000b1d602ae2314cf5cc225e34a041f5a3081edeed5e0f60f9c587ea03fb2cf58b0f7e70aae0690a039568659608636c04b6af3c41aa7ba4119f765ba9
@@ -3,6 +3,7 @@ module Souls
3
3
  desc "setup_vpc_nat", "Set Up VPC Cloud Nat"
4
4
  method_option :range, default: "10.124.0.0/28", aliases: "--range", desc: "GCP VPC Network IP Range"
5
5
  def setup_vpc_nat
6
+ puts(Paint["Initializing NAT Setup This process might take about 5 min...", :yellow])
6
7
  create_network
7
8
  create_firewall_tcp(range: options[:range])
8
9
  create_firewall_ssh
@@ -11,7 +12,10 @@ module Souls
11
12
  create_router
12
13
  create_external_ip
13
14
  create_nat
14
- nat_credit
15
+ Souls::Sql.new.invoke(:setup_private_ip)
16
+ update_workflows
17
+ puts(Paint["Cloud NAT is All Set!", :green])
18
+ true
15
19
  rescue Thor::Error => e
16
20
  raise(Thor::Error, e)
17
21
  end
@@ -88,40 +92,24 @@ module Souls
88
92
  system("gcloud compute networks list")
89
93
  end
90
94
 
91
- def nat_credit
95
+ def update_workflows
92
96
  app_name = Souls.configuration.app
93
- line = Paint["====================================", :yellow]
94
- puts("\n")
95
- puts(line)
96
- txt2 = <<~TEXT
97
- _____ ____ __ ____#{' '}
98
- / ___// __ \\/ / / / / %{red1}
99
- \\__ \\/ / / / / / / / %{red2}
100
- ___/ / /_/ / /_/ / /___%{red3}#{' '}
101
- /____/\\____/\\____/_____%{red4}#{' '}
102
- TEXT
103
- red1 = ["_____", :red]
104
- red2 = ["/ ___/", :red]
105
- red3 = ["(__ )", :red]
106
- red4 = ["/____/", :red]
107
- ms = Paint % [txt2, :cyan, { red1: red1, red2: red2, red3: red3, red4: red4 }]
108
- puts(ms)
109
- puts(line)
110
- welcome = Paint["VPC Network is All Set!", :white]
111
- puts(welcome)
112
- puts(line)
113
- endroll = <<~TEXT
114
-
115
- Edit `.github/workflow/worker.yml`
116
-
117
- Add these 2 options in \n`- name: Deploy to Cloud Run` step
118
- \n--vpc-connector=#{app_name}-connector \
119
- \n--vpc-egress=all \
120
-
121
- TEXT
122
- cd = Paint[endroll, :white]
123
- puts(cd)
124
- puts(line)
97
+ Dir.chdir(Souls.get_mother_path.to_s) do
98
+ api_workflow_path = ".github/workflows/api.yml"
99
+ worker_workflow_paths = Dir[".github/workflows/*.yml"]
100
+ worker_workflow_paths.delete(api_workflow_path)
101
+ File.open(api_workflow_path, "a") do |line|
102
+ line.write(" \\ \n --vpc-connector=#{app_name}-connector")
103
+ end
104
+ puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [api_workflow_path.to_s, :white] }])
105
+ worker_workflow_paths.each do |file_path|
106
+ File.open(file_path, "a") do |line|
107
+ line.write(" \\ --vpc-connector=#{app_name}-connector \\")
108
+ line.write("\n --vpc-egress=all")
109
+ end
110
+ puts(Paint % ["Updated file! : %{white_text}", :green, { white_text: [file_path.to_s, :white] }])
111
+ end
112
+ end
125
113
  end
126
114
  end
127
115
  end
@@ -33,10 +33,7 @@ module Souls
33
33
  puts("before build")
34
34
  system("rake build")
35
35
  system("rake release")
36
- system(
37
- "git -c log.ShowSignature=false log v#{current_souls_ver.join('.')}... \
38
- --reverse --merges --grep='Merge pull request' --pretty=format:%B > ./CHANGELOG.md"
39
- )
36
+ write_changelog(current_souls_ver: current_souls_ver)
40
37
  system("gh release create v#{souls_new_ver} -t v#{souls_new_ver} -F ./CHANGELOG.md")
41
38
  system("gsutil -m -q cp -r coverage gs://souls-bucket/souls-coverage")
42
39
  Whirly.status = Paint["soul-v#{souls_new_ver} successfully updated!"]
@@ -45,6 +42,22 @@ module Souls
45
42
 
46
43
  private
47
44
 
45
+ def write_changelog(current_souls_ver:)
46
+ doc =
47
+ `git -c log.ShowSignature=false log v#{current_souls_ver.join(".")}... \
48
+ --reverse --merges --grep='Merge pull request' --pretty=format:%B`
49
+
50
+ md = ""
51
+ doc.each_line do |l|
52
+ md << if l.include?("Merge pull request")
53
+ "### #{l}"
54
+ else
55
+ l
56
+ end
57
+ end
58
+ File.open("./CHANGELOG.md", "w") { |f| f.write(md) }
59
+ end
60
+
48
61
  def update_repo(service_name: "api", update_kind: "patch")
49
62
  current_dir_name = FileUtils.pwd.to_s.match(%r{/([^/]+)/?$})[1]
50
63
  current_ver = Souls.get_latest_version_txt(service_name: service_name)
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.6.11".freeze
2
+ VERSION = "1.6.15".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.6.11
1
+ 1.6.15
@@ -1 +1 @@
1
- 1.6.11
1
+ 1.6.15
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.11
4
+ version: 1.6.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -232,7 +232,7 @@ licenses:
232
232
  metadata:
233
233
  homepage_uri: https://souls.elsoul.nl
234
234
  source_code_uri: https://github.com/elsoul/souls
235
- changelog_uri: https://github.com/elsoul/souls/releases/tag/v1.6.11
235
+ changelog_uri: https://github.com/elsoul/souls/releases/tag/v1.6.15
236
236
  post_install_message:
237
237
  rdoc_options: []
238
238
  require_paths: