takelage 0.29.14 → 0.30.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/takelage.rb +2 -2
- data/lib/takelage/bit/clipboard/cli.rb +1 -1
- data/lib/takelage/bit/clipboard/lib.rb +3 -3
- data/lib/takelage/bit/require/cli.rb +1 -1
- data/lib/takelage/bit/scope/add.rb +1 -1
- data/lib/takelage/bit/scope/cli.rb +6 -6
- data/lib/takelage/bit/scope/{inbit.rb → ssh.rb} +4 -4
- data/lib/takelage/default.yml +2 -2
- data/lib/takelage/git/check/bit.rb +26 -0
- data/lib/takelage/git/check/cli.rb +13 -13
- data/lib/takelage/version +1 -1
- metadata +3 -3
- data/lib/takelage/git/check/main.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2df3a519d6d5690b6dd1c9758d720bfff1ebd6afc8a3c116db5651bb223b0266
|
4
|
+
data.tar.gz: d924838d82f60a4d1bab01e151896f0875552726b8a9d8bdb0a6a672f12def91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cceb1a7e8200a7217b4bb5b068d8c51b40e7c425921c7150c346964a1d31fbe103dcc1b2f9b90870f3388f5fbe1bb62e3a54f664d564f33b083916288920784
|
7
|
+
data.tar.gz: 40fd4ac0c4782ae56a26a76c3fbe3503252147b78e1ca66cd8ccde97f3e909acd6f084ba177ac31de6d61dc01632f828a448c91d8abb56e59b0cfc31bc3b8863
|
data/README.md
CHANGED
@@ -26,7 +26,6 @@ command line script using the
|
|
26
26
|
| *[takelage-bit](https://github.com/geospin-takelage/takelage-bit)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/bitboard/latest?label=hub.docker.com&sort=semver&color=blue)](https://hub.docker.com/r/takelage/bitboard) |
|
27
27
|
| *[takelage-img-takelslim](https://github.com/geospin-takelage/takelage-img-takelslim)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/takelslim/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelage/takelslim) |
|
28
28
|
| *[takelage-img-takelbase](https://github.com/geospin-takelage/takelage-img-takelbase)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/takelbase/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelage/takelbase) |
|
29
|
-
| *[takelage-img-multipostgres](https://github.com/geospin-takelage/takelage-img-multipostgres)* | [![hub.docker.com](https://img.shields.io/docker/v/takelage/multipostgres/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelage/multipostgres) |
|
30
29
|
|
31
30
|
## Framework Status
|
32
31
|
|
@@ -38,7 +37,6 @@ command line script using the
|
|
38
37
|
| *[takelage-bit](https://github.com/geospin-takelage/takelage-bit)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-bit/Build,%20test%20and%20deploy%20project?label=deploy%20project)](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-bit/Build%20and%20test%20project?label=test%20project)](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_project_nightly.yml) | [![test roles](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-bit/Test%20roles?label=test%20roles)](https://github.com/geospin-takelage/takelage-bit/actions/workflows/build_test_roles_nightly.yml) |
|
39
38
|
| *[takelage-img-takelslim](https://github.com/geospin-takelage/takelage-img-takelslim)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-img-takelslim/Build%20and%20deploy%20takelslim?label=deploy%20project)](https://github.com/geospin-takelage/takelage-img-takelslim/actions/workflows/build_deploy_takelslim_nightly.yml) |
|
40
39
|
| *[takelage-img-takelbase](https://github.com/geospin-takelage/takelage-img-takelbase)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-img-takelbase/Build%20and%20deploy%20takelbase?label=deploy%20project)](https://github.com/geospin-takelage/takelage-img-takelbase/actions/workflows/build_deploy_takelbase_nightly.yml) |
|
41
|
-
| *[takelage-img-multipostgres](https://github.com/geospin-takelage/takelage-img-multipostgres)* | [![deploy project](https://img.shields.io/github/workflow/status/geospin-takelage/takelage-img-multipostgres/Build%20and%20deploy%20multipostgres?label=deploy%20project)](https://github.com/geospin-takelage/takelage-img-multipostgres/actions/workflows/build_deploy_multipostgres_nightly.yml) |
|
42
40
|
|
43
41
|
## Installation
|
44
42
|
|
@@ -73,7 +71,7 @@ tau [bit clipboard push](features/cucumber/features/bit/bit.clipboard.push.featu
|
|
73
71
|
tau [bit require export](features/cucumber/features/bit/bit.require.export.feature) | Show requirements file of bit components
|
74
72
|
tau [bit require import](features/cucumber/features/bit/bit.require.import.feature) | Import bit components from requirements file
|
75
73
|
tau [bit scope add](features/cucumber/features/bit/bit.scope.add.feature) [SCOPE] | Add a bit [SCOPE]
|
76
|
-
tau [bit scope
|
74
|
+
tau [bit scope ssh](features/cucumber/features/bit/bit.scope.ssh.feature) | Log in to bit remote server
|
77
75
|
tau [bit scope list](features/cucumber/features/bit/bit.scope.list.feature) | List bit remote scopes
|
78
76
|
tau [bit scope new](features/cucumber/features/bit/bit.scope.new.feature) [SCOPE] | Init a new bit [SCOPE]
|
79
77
|
tau [completion bash](features/cucumber/features/completion/completion.bash.feature) | Print bash completion code
|
@@ -91,7 +89,7 @@ tau [docker image tag latest](features/cucumber/features/docker/docker.image.tag
|
|
91
89
|
tau [docker image tag list](features/cucumber/features/docker/docker.image.tag.list.feature) | Print local docker image tags
|
92
90
|
tau [docker image update](features/cucumber/features/docker/docker.image.update.feature) | Get latest remote docker container
|
93
91
|
tau [git check clean](features/cucumber/features/git/git.check.clean.feature) | Check if the git workspace is clean
|
94
|
-
tau [git check
|
92
|
+
tau [git check bit](features/cucumber/features/git/git.check.bit.feature) | Check if we are on the git bit branch
|
95
93
|
tau [git check workspace](features/cucumber/features/git/git.check.workspace.feature) | Check if a git workspace exists
|
96
94
|
tau [info project active](features/cucumber/features/info/info.project.active.feature) | Print active project info
|
97
95
|
tau [info project dir](features/cucumber/features/info/info.project.dir.feature) | Print project root directory
|
data/lib/takelage.rb
CHANGED
@@ -21,14 +21,14 @@ require_relative 'takelage/lib/config'
|
|
21
21
|
require_relative 'takelage/lib/project'
|
22
22
|
|
23
23
|
require_relative 'takelage/git/check/clean'
|
24
|
-
require_relative 'takelage/git/check/
|
24
|
+
require_relative 'takelage/git/check/bit'
|
25
25
|
require_relative 'takelage/git/check/workspace'
|
26
26
|
require_relative 'takelage/git/check/cli'
|
27
27
|
require_relative 'takelage/git/cli'
|
28
28
|
require_relative 'takelage/bit/check/workspace'
|
29
29
|
require_relative 'takelage/bit/check/cli'
|
30
30
|
require_relative 'takelage/bit/scope/add'
|
31
|
-
require_relative 'takelage/bit/scope/
|
31
|
+
require_relative 'takelage/bit/scope/ssh'
|
32
32
|
require_relative 'takelage/bit/scope/list'
|
33
33
|
require_relative 'takelage/bit/scope/new'
|
34
34
|
require_relative 'takelage/bit/scope/cli'
|
@@ -26,7 +26,7 @@ module BitClipboardLib
|
|
26
26
|
|
27
27
|
# Prepare git workspace for bit clipboard.
|
28
28
|
def _bit_clipboard_lib_prepare_git_workspace
|
29
|
-
unless
|
29
|
+
unless git_check_bit
|
30
30
|
log.error 'Not on git main branch'
|
31
31
|
return false
|
32
32
|
end
|
@@ -97,7 +97,7 @@ module BitClipboardLib
|
|
97
97
|
|
98
98
|
cmd_bit_clipboard_git_push = format(
|
99
99
|
config.active['cmd_bit_clipboard_git_push'],
|
100
|
-
main: config.active['
|
100
|
+
main: config.active['git_bit_branch']
|
101
101
|
)
|
102
102
|
|
103
103
|
run cmd_bit_clipboard_git_push
|
@@ -108,7 +108,7 @@ module BitClipboardLib
|
|
108
108
|
log.debug 'Updating git workspace'
|
109
109
|
cmd_bit_clipboard_git_pull = format(
|
110
110
|
config.active['cmd_bit_clipboard_git_pull'],
|
111
|
-
main: config.active['
|
111
|
+
main: config.active['git_bit_branch']
|
112
112
|
)
|
113
113
|
|
114
114
|
return true if try cmd_bit_clipboard_git_pull
|
@@ -6,11 +6,11 @@ module Takelage
|
|
6
6
|
include LoggingModule
|
7
7
|
include SystemModule
|
8
8
|
include ConfigModule
|
9
|
-
include
|
9
|
+
include GitCheckBit
|
10
10
|
include GitCheckWorkspace
|
11
11
|
include BitCheckWorkspace
|
12
12
|
include BitScopeAdd
|
13
|
-
include
|
13
|
+
include BitScopeSSH
|
14
14
|
include BitScopeList
|
15
15
|
include BitScopeNew
|
16
16
|
|
@@ -60,15 +60,15 @@ module Takelage
|
|
60
60
|
end
|
61
61
|
|
62
62
|
#
|
63
|
-
# bit scope
|
63
|
+
# bit scope ssh
|
64
64
|
#
|
65
|
-
desc '
|
65
|
+
desc 'ssh', 'Log in to bit remote server'
|
66
66
|
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
67
67
|
Log in to bit remote server
|
68
68
|
LONGDESC
|
69
69
|
# Log in to bit remote server.
|
70
|
-
def
|
71
|
-
exit
|
70
|
+
def ssh
|
71
|
+
exit bit_scope_ssh
|
72
72
|
end
|
73
73
|
end
|
74
74
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# takelage bit scope
|
4
|
-
module
|
5
|
-
# Backend method for bit scope
|
6
|
-
def
|
3
|
+
# takelage bit scope ssh
|
4
|
+
module BitScopeSSH
|
5
|
+
# Backend method for bit scope ssh.
|
6
|
+
def bit_scope_ssh
|
7
7
|
log.debug 'Logging in to bit remote server'
|
8
8
|
|
9
9
|
return false unless configured? %w[bit_ssh]
|
data/lib/takelage/default.yml
CHANGED
@@ -48,7 +48,7 @@ cmd_docker_image_update_docker_remove_dangling: 'docker image prune --force'
|
|
48
48
|
cmd_git_check_clean_git_unstaged: 'git diff --exit-code'
|
49
49
|
cmd_git_check_clean_git_uncommitted: 'git diff --cached --exit-code'
|
50
50
|
cmd_git_check_clean_git_status: 'git status --porcelain'
|
51
|
-
|
51
|
+
cmd_git_check_bit_get_git_branch: 'git symbolic-ref HEAD'
|
52
52
|
cmd_git_check_workspace_git_repo: 'git -C %{dir} rev-parse'
|
53
53
|
cmd_git_check_workspace_pwd: 'pwd'
|
54
54
|
cmd_info_status_lib_git_name: 'git -C %{root} config user.name'
|
@@ -76,7 +76,7 @@ docker_run_options: '--env GOOGLE_APPLICATION_CREDENTIALS=/hostdir/.google/defau
|
|
76
76
|
docker_shm_size: '512M'
|
77
77
|
docker_tag: 'latest'
|
78
78
|
docker_user: 'takelage'
|
79
|
-
|
79
|
+
git_bit_branch: 'main'
|
80
80
|
info_project_main: 'project.yml'
|
81
81
|
info_project_private: 'private/project.yml'
|
82
82
|
login_wait_for_sockets: '0'
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# takelage git check bit
|
4
|
+
module GitCheckBit
|
5
|
+
# Backend method for git check bit.
|
6
|
+
# @return [Boolean] are we on the git bit branch?
|
7
|
+
def git_check_bit
|
8
|
+
log.debug 'Check if we are on the git bit branch'
|
9
|
+
|
10
|
+
return false unless git_check_workspace
|
11
|
+
|
12
|
+
branch = _git_check_bit_get_branch
|
13
|
+
log.debug "We are on git branch \"#{branch}\""
|
14
|
+
|
15
|
+
branch == config.active['git_bit_branch']
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
# Get git branch.
|
21
|
+
def _git_check_bit_get_branch
|
22
|
+
cmd_get_branch =
|
23
|
+
config.active['cmd_git_check_bit_get_git_branch']
|
24
|
+
(run cmd_get_branch).chomp.split('/')[-1]
|
25
|
+
end
|
26
|
+
end
|
@@ -7,31 +7,31 @@ module Takelage
|
|
7
7
|
include SystemModule
|
8
8
|
include ConfigModule
|
9
9
|
include GitCheckClean
|
10
|
-
include
|
10
|
+
include GitCheckBit
|
11
11
|
include GitCheckWorkspace
|
12
12
|
|
13
13
|
#
|
14
|
-
# git check
|
14
|
+
# git check bit
|
15
15
|
#
|
16
|
-
desc '
|
16
|
+
desc 'bit', 'Check if we are on the git bit branch'
|
17
17
|
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
18
|
-
Check if the git
|
18
|
+
Check if we are on the git bit branch
|
19
19
|
LONGDESC
|
20
|
-
# Check if the git
|
21
|
-
def
|
22
|
-
exit
|
20
|
+
# Check if we are on the git bit branch.
|
21
|
+
def bit
|
22
|
+
exit git_check_bit
|
23
23
|
end
|
24
24
|
|
25
25
|
#
|
26
|
-
# git check
|
26
|
+
# git check clean
|
27
27
|
#
|
28
|
-
desc '
|
28
|
+
desc 'clean', 'Check if the git workspace is clean'
|
29
29
|
long_desc <<-LONGDESC.gsub("\n", "\x5")
|
30
|
-
Check if
|
30
|
+
Check if the git workspace is clean
|
31
31
|
LONGDESC
|
32
|
-
# Check if
|
33
|
-
def
|
34
|
-
exit
|
32
|
+
# Check if the git workspace is clean.
|
33
|
+
def clean
|
34
|
+
exit git_check_clean
|
35
35
|
end
|
36
36
|
|
37
37
|
#
|
data/lib/takelage/version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.30.0
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: takelage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.30.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geospin
|
@@ -220,9 +220,9 @@ files:
|
|
220
220
|
- lib/takelage/bit/require/lib.rb
|
221
221
|
- lib/takelage/bit/scope/add.rb
|
222
222
|
- lib/takelage/bit/scope/cli.rb
|
223
|
-
- lib/takelage/bit/scope/inbit.rb
|
224
223
|
- lib/takelage/bit/scope/list.rb
|
225
224
|
- lib/takelage/bit/scope/new.rb
|
225
|
+
- lib/takelage/bit/scope/ssh.rb
|
226
226
|
- lib/takelage/completion/cli.rb
|
227
227
|
- lib/takelage/default.yml
|
228
228
|
- lib/takelage/docker/check/cli.rb
|
@@ -245,9 +245,9 @@ files:
|
|
245
245
|
- lib/takelage/docker/image/tag/latest.rb
|
246
246
|
- lib/takelage/docker/image/tag/list.rb
|
247
247
|
- lib/takelage/docker/image/update.rb
|
248
|
+
- lib/takelage/git/check/bit.rb
|
248
249
|
- lib/takelage/git/check/clean.rb
|
249
250
|
- lib/takelage/git/check/cli.rb
|
250
|
-
- lib/takelage/git/check/main.rb
|
251
251
|
- lib/takelage/git/check/workspace.rb
|
252
252
|
- lib/takelage/git/cli.rb
|
253
253
|
- lib/takelage/info/cli.rb
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# takelage git check main
|
4
|
-
module GitCheckMain
|
5
|
-
# Backend method for git check main.
|
6
|
-
# @return [Boolean] are we on the git main branch?
|
7
|
-
def git_check_main
|
8
|
-
log.debug 'Check if we are on the git main branch'
|
9
|
-
|
10
|
-
return false unless git_check_workspace
|
11
|
-
|
12
|
-
branch = _git_check_main_get_branch
|
13
|
-
log.debug "We are on git branch \"#{branch}\""
|
14
|
-
|
15
|
-
branch == config.active['git_main_branch']
|
16
|
-
end
|
17
|
-
|
18
|
-
private
|
19
|
-
|
20
|
-
# Get git branch.
|
21
|
-
def _git_check_main_get_branch
|
22
|
-
cmd_get_branch =
|
23
|
-
config.active['cmd_git_check_main_git_branch']
|
24
|
-
(run cmd_get_branch).chomp.split('/')[-1]
|
25
|
-
end
|
26
|
-
end
|