takeltau 0.34.14 → 0.35.14

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.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -27
  3. data/lib/takeltau/completion/cli.rb +1 -1
  4. data/lib/takeltau/default.yml +10 -35
  5. data/lib/takeltau/docker/check/cli.rb +1 -1
  6. data/lib/takeltau/docker/check/daemon.rb +1 -1
  7. data/lib/takeltau/docker/cli.rb +1 -1
  8. data/lib/takeltau/docker/container/check/cli.rb +1 -1
  9. data/lib/takeltau/docker/container/check/existing.rb +1 -1
  10. data/lib/takeltau/docker/container/check/network.rb +1 -1
  11. data/lib/takeltau/docker/container/check/orphaned.rb +1 -1
  12. data/lib/takeltau/docker/container/clean.rb +1 -1
  13. data/lib/takeltau/docker/container/cli.rb +1 -1
  14. data/lib/takeltau/docker/container/command.rb +1 -1
  15. data/lib/takeltau/docker/container/daemon.rb +1 -1
  16. data/lib/takeltau/docker/container/lib.rb +1 -1
  17. data/lib/takeltau/docker/container/login.rb +1 -1
  18. data/lib/takeltau/docker/container/prune.rb +1 -1
  19. data/lib/takeltau/docker/image/cli.rb +1 -1
  20. data/lib/takeltau/docker/image/tag/check.rb +1 -1
  21. data/lib/takeltau/docker/image/tag/cli.rb +1 -1
  22. data/lib/takeltau/docker/image/tag/latest.rb +1 -1
  23. data/lib/takeltau/docker/image/tag/list.rb +1 -1
  24. data/lib/takeltau/docker/image/update.rb +1 -1
  25. data/lib/takeltau/git/check/clean.rb +1 -1
  26. data/lib/takeltau/git/check/cli.rb +14 -14
  27. data/lib/takeltau/git/check/hg.rb +26 -0
  28. data/lib/takeltau/git/check/workspace.rb +1 -1
  29. data/lib/takeltau/git/cli.rb +1 -1
  30. data/lib/takeltau/git/lib.rb +80 -0
  31. data/lib/takeltau/hg/cli.rb +56 -0
  32. data/lib/takeltau/hg/export.rb +18 -0
  33. data/lib/takeltau/hg/pull.rb +43 -0
  34. data/lib/takeltau/hg/push.rb +42 -0
  35. data/lib/takeltau/info/cli.rb +1 -1
  36. data/lib/takeltau/info/project/cli.rb +1 -1
  37. data/lib/takeltau/info/status/bar.rb +1 -1
  38. data/lib/takeltau/info/status/cli.rb +1 -1
  39. data/lib/takeltau/info/status/git.rb +1 -1
  40. data/lib/takeltau/info/status/gopass.rb +1 -1
  41. data/lib/takeltau/info/status/gpg.rb +1 -1
  42. data/lib/takeltau/info/status/lib.rb +1 -1
  43. data/lib/takeltau/info/status/ssh.rb +1 -1
  44. data/lib/takeltau/init/lib.rb +9 -28
  45. data/lib/takeltau/init/packer/cli.rb +4 -14
  46. data/lib/takeltau/init/packer/docker.rb +2 -5
  47. data/lib/takeltau/init/packer/templates/hgclone.tt +8 -0
  48. data/lib/takeltau/init/takelage/cli.rb +4 -14
  49. data/lib/takeltau/init/takelage/rake.rb +2 -5
  50. data/lib/takeltau/init/takelage/templates/hgclone.tt +2 -0
  51. data/lib/takeltau/lib/config.rb +2 -2
  52. data/lib/takeltau/lib/logging.rb +2 -2
  53. data/lib/takeltau/lib/project.rb +2 -2
  54. data/lib/takeltau/mutagen/check/cli.rb +1 -1
  55. data/lib/takeltau/mutagen/check/daemon.rb +1 -1
  56. data/lib/takeltau/mutagen/cli.rb +1 -1
  57. data/lib/takeltau/mutagen/socket/check.rb +1 -1
  58. data/lib/takeltau/mutagen/socket/cli.rb +1 -1
  59. data/lib/takeltau/mutagen/socket/create.rb +1 -1
  60. data/lib/takeltau/mutagen/socket/list.rb +1 -1
  61. data/lib/takeltau/mutagen/socket/terminate.rb +1 -1
  62. data/lib/takeltau/mutagen/socket/tidy.rb +1 -1
  63. data/lib/takeltau/self/cli.rb +1 -1
  64. data/lib/takeltau/self/config/cli.rb +1 -1
  65. data/lib/takeltau/self/list.rb +1 -1
  66. data/lib/takeltau/version +1 -1
  67. data/lib/takeltau.rb +37 -62
  68. metadata +9 -22
  69. data/lib/takeltau/bit/check/cli.rb +0 -23
  70. data/lib/takeltau/bit/check/workspace.rb +0 -37
  71. data/lib/takeltau/bit/cli.rb +0 -18
  72. data/lib/takeltau/bit/clipboard/cli.rb +0 -73
  73. data/lib/takeltau/bit/clipboard/copy.rb +0 -142
  74. data/lib/takeltau/bit/clipboard/lib.rb +0 -143
  75. data/lib/takeltau/bit/clipboard/paste.rb +0 -60
  76. data/lib/takeltau/bit/clipboard/pull.rb +0 -37
  77. data/lib/takeltau/bit/clipboard/push.rb +0 -37
  78. data/lib/takeltau/bit/require/cli.rb +0 -57
  79. data/lib/takeltau/bit/require/export.rb +0 -34
  80. data/lib/takeltau/bit/require/import.rb +0 -133
  81. data/lib/takeltau/bit/require/lib.rb +0 -19
  82. data/lib/takeltau/bit/scope/add.rb +0 -55
  83. data/lib/takeltau/bit/scope/cli.rb +0 -74
  84. data/lib/takeltau/bit/scope/list.rb +0 -41
  85. data/lib/takeltau/bit/scope/new.rb +0 -44
  86. data/lib/takeltau/bit/scope/ssh.rb +0 -13
  87. data/lib/takeltau/git/check/bit.rb +0 -26
  88. data/lib/takeltau/init/packer/templates/bitrequireyml.tt +0 -13
  89. data/lib/takeltau/init/takelage/templates/bitrequireyml.tt +0 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 026eacf3ac013b83881d9a9695186617779a1fe7578f885f521e9c59b4cf1cb1
4
- data.tar.gz: 01454d41117dbf35c48c958324858d000664434f99b18eb4ac897ef84e2f9eea
3
+ metadata.gz: c53b409dab198ff79a1a7263e72e117489f9c12936f43af82610ec45f6eff092
4
+ data.tar.gz: ce00f38a55ea35ba743b9720d151faa525fb1df0488a0b0fdb7690123f05cd12
5
5
  SHA512:
6
- metadata.gz: 1f60dfe409f1f8c7e2368bfb00fe24b72255f4da1244306031e55078c3cb34618a7f569af2e3db4d95b0f3b3aaa07847feb29490c15889908f05c715e6b58116
7
- data.tar.gz: 375da1dc4b1edb326134bd30b19a927fbebbd19efdb9a04bac883701f59d4c8b84c664cfa21f9dbe26be2b772d92e3fa55be2605a534adde2bfcab28b562b6e4
6
+ metadata.gz: a4e64776b363c093548674e7a7af3ecdeb5aa41bac4f52e0e7f1311ef35ef0d00c0ea948b95c00ad4ce7cac7424136cf32ad66455d13bce0f9a3c9374c3066fe
7
+ data.tar.gz: f1f6d60ed7c4dfbb3b6d1d77342e94dc2b625e3d7b92a07af4b6e3f5546c624a15b5dad1c6ecf67422a781e560fb32b0f2d26ab2068ee7701a35f3a47d673786
data/README.md CHANGED
@@ -23,7 +23,6 @@ command line script using the
23
23
  | *[takelage-dev](https://github.com/takelwerk/takelage-dev)* | [![hub.docker.com](https://img.shields.io/docker/v/takelwerk/takelage/latest?label=hub.docker.com&sort=semver&color=blue)](https://hub.docker.com/r/takelwerk/takelage) |
24
24
  | *[takelage-cli](https://github.com/takelwerk/takelage-cli)* | [![rubygems.org](https://img.shields.io/gem/v/takeltau?label=rubygems.org&color=blue)](https://rubygems.org/gems/takeltau) |
25
25
  | *[takelage-var](https://github.com/takelwerk/takelage-var)* | [![pypi,org](https://img.shields.io/pypi/v/pytest-takeltest?label=pypi.org&color=blue)](https://pypi.org/project/pytest-takeltest/) |
26
- | *[takelage-bit](https://github.com/takelwerk/takelage-bit)* | [![hub.docker.com](https://img.shields.io/docker/v/takelwerk/bitboard/latest?label=hub.docker.com&sort=semver&color=blue)](https://hub.docker.com/r/takelwerk/bitboard) |
27
26
  | *[takelage-img-takelslim](https://github.com/takelwerk/takelage-img-takelslim)* | [![hub.docker.com](https://img.shields.io/docker/v/takelwerk/takelslim/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelwerk/takelslim) |
28
27
  | *[takelage-img-takelbase](https://github.com/takelwerk/takelage-img-takelbase)* | [![hub.docker.com](https://img.shields.io/docker/v/takelwerk/takelbase/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelwerk/takelbase) |
29
28
  | *[takelage-img-takelruby](https://github.com/takelwerk/takelage-img-takelruby)* | [![hub.docker.com](https://img.shields.io/docker/v/takelwerk/takelruby/latest?label=hub.docker.com&color=blue)](https://hub.docker.com/r/takelwerk/takelruby) |
@@ -35,7 +34,6 @@ command line script using the
35
34
  | *[takelage-dev](https://github.com/takelwerk/takelage-dev)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-dev/Build,%20test%20and%20deploy%20project?label=deploy%20project)](https://github.com/takelwerk/takelage-dev/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/workflow/status/takelwerk/takelage-dev/Build%20and%20test%20project?label=test%20project)](https://github.com/takelwerk/takelage-dev/actions/workflows/build_test_project_nightly.yml) | [![test roles](https://img.shields.io/github/workflow/status/takelwerk/takelage-dev/Test%20roles?label=test%20roles)](https://github.com/takelwerk/takelage-dev/actions/workflows/build_test_roles_nightly.yml) |
36
35
  | *[takelage-cli](https://github.com/takelwerk/takelage-cli)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-cli/Build,%20test%20and%20deploy%20project?label=deploy%20project)](https://github.com/takelwerk/takelage-cli/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/workflow/status/takelwerk/takelage-cli/Test%20project?label=test%20project)](https://github.com/takelwerk/takelage-cli/actions/workflows/test_project_nightly.yml) |
37
36
  | *[takelage-var](https://github.com/takelwerk/takelage-var)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-var/Build,%20test%20and%20deploy%20project?label=deploy%20project)](https://github.com/takelwerk/takelage-var/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/workflow/status/takelwerk/takelage-var/Build%20and%20test%20project?label=test%20project)](https://github.com/takelwerk/takelage-var/actions/workflows/build_test_project_nightly.yml) |
38
- | *[takelage-bit](https://github.com/takelwerk/takelage-bit)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-bit/Build,%20test%20and%20deploy%20project?label=deploy%20project)](https://github.com/takelwerk/takelage-bit/actions/workflows/build_test_deploy_project_on_push.yml) | [![test project](https://img.shields.io/github/workflow/status/takelwerk/takelage-bit/Build%20and%20test%20project?label=test%20project)](https://github.com/takelwerk/takelage-bit/actions/workflows/build_test_project_nightly.yml) | [![test roles](https://img.shields.io/github/workflow/status/takelwerk/takelage-bit/Test%20roles?label=test%20roles)](https://github.com/takelwerk/takelage-bit/actions/workflows/build_test_roles_nightly.yml) |
39
37
  | *[takelage-img-takelslim](https://github.com/takelwerk/takelage-img-takelslim)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-img-takelslim/Build%20and%20deploy%20takelslim?label=deploy%20project)](https://github.com/takelwerk/takelage-img-takelslim/actions/workflows/build_deploy_takelslim_nightly.yml) |
40
38
  | *[takelage-img-takelbase](https://github.com/takelwerk/takelage-img-takelbase)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-img-takelbase/Build%20and%20deploy%20takelbase?label=deploy%20project)](https://github.com/takelwerk/takelage-img-takelbase/actions/workflows/build_deploy_takelbase_nightly.yml) |
41
39
  | *[takelage-img-takelruby](https://github.com/takelwerk/takelage-img-takelruby)* | [![deploy project](https://img.shields.io/github/workflow/status/takelwerk/takelage-img-takelruby/Build%20and%20deploy%20takelruby%20latest?label=deploy%20project)](https://github.com/takelwerk/takelage-img-takelruby/actions/workflows/build_deploy_takelruby_nightly.yml) |
@@ -65,17 +63,6 @@ or *tau list*:
65
63
 
66
64
  Command | Description
67
65
  ------- | -----------
68
- tau [bit check workspace](features/cucumber/features/bit/bit.check.workspace.feature) | Check if a bit workspace exists
69
- tau [bit clipboard copy](features/cucumber/features/bit/bit.clipboard.copy.feature) [DIR] [SCOPE] | Copy new [DIR] to [SCOPE]
70
- tau [bit clipboard paste](features/cucumber/features/bit/bit.clipboard.paste.feature) [COMPONENT] [DIR] | Paste bit [COMPONENT] into [DIR]
71
- tau [bit clipboard pull](features/cucumber/features/bit/bit.clipboard.pull.feature) | Pull all updates for bit components from bit remote scopes
72
- tau [bit clipboard push](features/cucumber/features/bit/bit.clipboard.push.feature) | Push all updates of bit components to bit remote scopes
73
- tau [bit require export](features/cucumber/features/bit/bit.require.export.feature) | Show requirements file of bit components
74
- tau [bit require import](features/cucumber/features/bit/bit.require.import.feature) | Import bit components from requirements file
75
- tau [bit scope add](features/cucumber/features/bit/bit.scope.add.feature) [SCOPE] | Add a bit [SCOPE]
76
- tau [bit scope ssh](features/cucumber/features/bit/bit.scope.ssh.feature) | Log in to bit remote server
77
- tau [bit scope list](features/cucumber/features/bit/bit.scope.list.feature) | List bit remote scopes
78
- tau [bit scope new](features/cucumber/features/bit/bit.scope.new.feature) [SCOPE] | Init a new bit [SCOPE]
79
66
  tau [completion bash](features/cucumber/features/completion/completion.bash.feature) | Print bash completion code
80
67
  tau [docker check daemon](features/cucumber/features/docker/docker.check.daemon.feature) | Check if docker daemon is running
81
68
  tau [docker container check existing](features/cucumber/features/docker/docker.container.check.existing.feature) [CONTAINER] | Check if docker [CONTAINER] is existing
@@ -91,8 +78,11 @@ tau [docker image tag latest](features/cucumber/features/docker/docker.image.tag
91
78
  tau [docker image tag list](features/cucumber/features/docker/docker.image.tag.list.feature) | Print local docker image tags
92
79
  tau [docker image update](features/cucumber/features/docker/docker.image.update.feature) | Get latest remote docker container
93
80
  tau [git check clean](features/cucumber/features/git/git.check.clean.feature) | Check if the git workspace is clean
94
- tau [git check bit](features/cucumber/features/git/git.check.bit.feature) | Check if we are on the git bit branch
81
+ tau [git check hg](features/cucumber/features/git/git.check.hg.feature) | Check if we are on the git hg branch
95
82
  tau [git check workspace](features/cucumber/features/git/git.check.workspace.feature) | Check if a git workspace exists
83
+ tau [hg export](features/cucumber/features/hg/hg.export.feature) | Export hg repos
84
+ tau [hg pull](features/cucumber/features/hg/hg.pull.feature) | Pull hg repos
85
+ tau [hg push](features/cucumber/features/hg/hg.push.feature) | Push hg repos
96
86
  tau [info project active](features/cucumber/features/info/info.project.active.feature) | Print active project info
97
87
  tau [info project dir](features/cucumber/features/info/info.project.dir.feature) | Print project root directory
98
88
  tau [info project main](features/cucumber/features/info/info.project.main.feature) | Print main project info
@@ -118,14 +108,12 @@ tau [self list](features/cucumber/features/self/self.list.feature) | List all co
118
108
  tau [self version](features/cucumber/features/self/self.version.feature) | Print tau semantic version number
119
109
  tau clean | Alias for tau [docker container clean](features/cucumber/features/docker/docker.container.clean.feature)
120
110
  tau config | Alias for tau [self config active](features/cucumber/features/self/self.config.active.feature)
121
- tau copy [DIR] [SCOPE] | Alias for tau [bit clipboard copy](features/cucumber/features/bit/bit.clipboard.copy.feature)
122
111
  tau list | Alias for tau [self list](features/cucumber/features/self/self.list.feature)
123
112
  tau login | Alias for tau [docker container login](features/cucumber/features/docker/docker.container.login.feature)
124
- tau paste [COMPONENT] [DIR] | Alias for tau [bit clipboard paste](features/cucumber/features/bit/bit.clipboard.paste.feature)
125
113
  tau project | Alias for tau [info project active](features/cucumber/features/info/info.project.active.feature)
126
114
  tau prune | Alias for tau [docker container prune](features/cucumber/features/docker/docker.container.prune.feature)
127
- tau pull | Alias for tau [bit clipboard pull](features/cucumber/features/bit/bit.clipboard.pull.feature)
128
- tau push | Alias for tau [bit clipboard push](features/cucumber/features/bit/bit.clipboard.push.feature)
115
+ tau pull | Alias for tau [hg pull](features/cucumber/features/hg/hg.pull.feature)
116
+ tau push | Alias for tau [hg push](features/cucumber/features/hg/hg.push.feature)
129
117
  tau status | Alias for tau [docker info status bar](features/cucumber/features/info/info.status.bar.feature)
130
118
  tau update | Alias for tau [docker image update](features/cucumber/features/docker/docker.image.update.feature)
131
119
  tau version | Alias for tau [self version](features/cucumber/features/self/self.version.feature)
@@ -155,12 +143,11 @@ Please remember that a project directory is identified by the main
155
143
  ### Configuration Examples
156
144
 
157
145
  - You should add the following configuration items in your *~/.takelage.yml*
158
- if you want to use a private bit remote server:
146
+ if you want to use the *takelbeta* docker image channel:
159
147
 
160
148
  ```yaml
161
149
  ---
162
- bit_remote: 'ssh://bit@bit.example.com:222:/bit'
163
- bit_ssh: 'ssh -p 222 bit@bit.example.com'
150
+ docker_repo: takelbeta
164
151
  ```
165
152
 
166
153
  - If you want to pin a specific docker tag for one of your projects
@@ -229,9 +216,3 @@ You need to whitelist it in your host's docker engine configuration:
229
216
  ]
230
217
  }
231
218
  ```
232
-
233
- *takelage-cli* deploys a
234
- *[bitboard](https://hub.docker.com/r/takelwerk/bitboard)*
235
- server created with
236
- *[takelage-bit](https://github.com/takelwerk/takelage-bit)*
237
- to end-to-end test the *tau bit* commands.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau completion
4
+ # tau completion
5
5
  class Completion < SubCommandBase
6
6
  include LoggingModule
7
7
 
@@ -1,35 +1,4 @@
1
1
  ---
2
- bit_dev_user: 'takelage'
3
- bit_remote: ''
4
- bit_require_file: 'bitrequire.yml'
5
- bit_root: '/bit'
6
- bit_ssh: ''
7
- cmd_bit: 'bit'
8
- cmd_bit_check_workspace_bit_list: 'bit status'
9
- cmd_bit_check_workspace_pwd: 'pwd'
10
- cmd_bit_clipboard_lib_bit_status: 'bit status'
11
- cmd_bit_clipboard_copy_bit_list_scope: 'bit list --json %{scope}'
12
- cmd_bit_clipboard_copy_bit_list_remotes: 'bit remote'
13
- cmd_bit_clipboard_copy_bit_add_dir: 'bit add --id %{id} --main %{dir}/README.bit %{dir}'
14
- cmd_bit_clipboard_copy_bit_tag_id: 'bit tag --skip-tests %{id}'
15
- cmd_bit_clipboard_copy_bit_export_to_scope: 'bit export %{scope}'
16
- cmd_bit_clipboard_git_add: 'git add %{file}'
17
- cmd_bit_clipboard_git_commit: 'git commit --message="%{message}"'
18
- cmd_bit_clipboard_git_pull: 'git pull origin %{main}'
19
- cmd_bit_clipboard_git_push: 'git push origin %{main}'
20
- cmd_bit_clipboard_paste_bit_list_scope: 'bit list --json %{scope}'
21
- cmd_bit_clipboard_paste_bit_import_cid: 'bit import --ignore-package-json --ignore-dist --path %{dir} %{cid}'
22
- cmd_bit_clipboard_pull_bit_import_all: 'bit import --ignore-package-json --ignore-dist'
23
- cmd_bit_clipboard_pull_bit_checkout_all: 'bit checkout --ignore-package-json --ignore-dist --all latest'
24
- cmd_bit_clipboard_push_bit_tag_all: 'bit tag --skip-tests --all'
25
- cmd_bit_clipboard_push_bit_export_all: 'bit export --all'
26
- cmd_bit_clipboard_export_bit_list: 'bit list --json %{scope}'
27
- cmd_bit_require_lib_bit_list: 'bit list --json'
28
- cmd_bit_require_lib_bit_list_ids: 'bit list --json --ids'
29
- cmd_bit_scope_add_scope: 'bit remote add %{remote}/%{scope}'
30
- cmd_bit_scope_list_find_scopes: 'find -L %{root} -name scope.json'
31
- cmd_bit_scope_new_bit_init: 'mkdir -p %{root}/%{scope} && cd %{root}/%{scope} && bit init --bare'
32
- cmd_bit_scope_remove_scope: 'rm --force --recursive %{root}/%{scope}'
33
2
  cmd_docker: 'docker'
34
3
  cmd_docker_check_daemon_docker_info: 'docker info'
35
4
  cmd_docker_container_check_existing_docker_ps: 'docker ps --filter name=^%{container}$ --quiet'
@@ -51,9 +20,16 @@ cmd_git: 'git'
51
20
  cmd_git_check_clean_git_unstaged: 'git diff --exit-code'
52
21
  cmd_git_check_clean_git_uncommitted: 'git diff --cached --exit-code'
53
22
  cmd_git_check_clean_git_status: 'git status --porcelain'
54
- cmd_git_check_bit_get_git_branch: 'git symbolic-ref HEAD'
23
+ cmd_git_check_hg_get_git_branch: 'git symbolic-ref HEAD'
55
24
  cmd_git_check_workspace_git_repo: 'git -C %{dir} rev-parse'
56
25
  cmd_git_check_workspace_pwd: 'pwd'
26
+ cmd_git_lib_git_add_all: 'git add --all'
27
+ cmd_git_lib_git_commit: 'git commit --message="%{message}"'
28
+ cmd_git_lib_git_pull_origin: 'git pull origin %{main}'
29
+ cmd_git_lib_git_push_origin: 'git push origin %{main}'
30
+ cmd_hg_export_repos: 'cd %{root}; find * -type d -name ".hg" | parallel hg paths default -R {//} -T "hg\ clone\ {url}\ " \; echo {//}'
31
+ cmd_hg_pull_repos: 'cd %{root}; find * -type d -name ".hg" | parallel echo \; cd {//} \; pwd \; hg pull \; hg update'
32
+ cmd_hg_push_repos: 'cd %{root}; find * -type d -name ".hg" | parallel echo \; cd {//} \; pwd \; hg add \; hg commit -m "Update\ hg\ repos" \; hg bookmark -f main \; hg push'
57
33
  cmd_info_status_lib_git_name: 'git -C %{root} config user.name'
58
34
  cmd_info_status_lib_git_email: 'git -C %{root} config user.email'
59
35
  cmd_info_status_lib_git_signingkey: 'git -C %{root} config user.signingKey'
@@ -63,10 +39,10 @@ cmd_info_status_gpg_agent: 'gpg-connect-agent /bye'
63
39
  cmd_info_status_gpg_keys: 'gpg --list-keys'
64
40
  cmd_info_status_ssh_keys: 'ssh-add -l'
65
41
  cmd_info_status_ssh_socket: 'gpgconf --list-dirs agent-ssh-socket'
66
- cmd_init_lib_bit_init: 'bit init'
67
42
  cmd_init_lib_git_init: 'git init && git checkout -b main'
68
43
  cmd_init_lib_git_add_all: 'git add --all'
69
44
  cmd_init_lib_git_commit_initial: 'git commit -m "Initial commit"'
45
+ cmd_init_lib_hg_clone: 'bash hgclone'
70
46
  cmd_mutagen: 'mutagen'
71
47
  cmd_mutagen_check_daemon_host_connection: 'mutagen forward list --label-selector="%{hostlabel}"'
72
48
  cmd_mutagen_check_daemon_version: 'mutagen version'
@@ -84,10 +60,9 @@ docker_run_options: '--env GOOGLE_APPLICATION_CREDENTIALS=/hostdir/.google/defau
84
60
  docker_shm_size: '512M'
85
61
  docker_tag: 'latest'
86
62
  docker_user: 'takelwerk'
87
- git_bit_branch: 'main'
63
+ git_hg_branch: 'main'
88
64
  info_project_main: 'project.yml'
89
65
  info_project_private: 'private/project.yml'
90
- init_bit_require_import: 'true'
91
66
  login_wait_for_sockets: '0'
92
67
  mutagen_socket_path_mutagen: '~/.mutagen/daemon/daemon.sock'
93
68
  mutagen_socket_path_gpg: '~/.gnupg/S.gpg-agent'
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau docker check
4
+ # tau docker check
5
5
  class DockerCheck < SubCommandBase
6
6
  include LoggingModule
7
7
  include SystemModule
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker check daemon
3
+ # tau docker check daemon
4
4
  module DockerCheckDaemon
5
5
  # Backend method for docker check daemon.
6
6
  # @return [Boolean] is the docker daemon running?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau docker
4
+ # tau docker
5
5
  class Docker < SubCommandBase
6
6
  desc 'check [COMMAND]', 'Check docker'
7
7
  subcommand 'check', DockerCheck
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau docker container check
4
+ # tau docker container check
5
5
  class DockerContainerCheck < SubCommandBase
6
6
  include LoggingModule
7
7
  include SystemModule
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container check existing
3
+ # tau docker container check existing
4
4
  module DockerContainerCheckExisting
5
5
  # Backend method for docker container check existing.
6
6
  # @return [Boolean] is container existing?
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container check network
3
+ # tau docker container check network
4
4
  module DockerContainerCheckNetwork
5
5
  # Backend method for docker container check network.
6
6
  # @return [Boolean] is network existing?
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container check orphaned
3
+ # tau docker container check orphaned
4
4
  module DockerContainerCheckOrphaned
5
5
  # Backend method for docker container check orphaned.
6
6
  # @return [Boolean] is container orphaned?
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container clean
3
+ # tau docker container clean
4
4
  module DockerContainerClean
5
5
  # Backend method for docker container clean.
6
6
  def docker_container_clean
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau docker container
4
+ # tau docker container
5
5
  class DockerContainer < SubCommandBase
6
6
  include LoggingModule
7
7
  include SystemModule
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container command
3
+ # tau docker container command
4
4
  module DockerContainerCommand
5
5
  # Backend method for docker container command.
6
6
  def docker_container_command(command)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container daemon
3
+ # tau docker container daemon
4
4
  module DockerContainerDaemon
5
5
  # Backend method for docker container daemon.
6
6
  def docker_container_daemon
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container lib
3
+ # tau docker container lib
4
4
  # rubocop:disable Metrics/ModuleLength
5
5
  # rubocop:disable Style/IfUnlessModifier
6
6
  module DockerContainerLib
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container login
3
+ # tau docker container login
4
4
  module DockerContainerLogin
5
5
  # Backend method for docker container login.
6
6
  def docker_container_login
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker container prune
3
+ # tau docker container prune
4
4
  module DockerContainerPrune
5
5
  # Backend method for docker container prune.
6
6
  def docker_container_prune
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau docker image
4
+ # tau docker image
5
5
  class DockerImage < SubCommandBase
6
6
  include LoggingModule
7
7
  include SystemModule
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker image tag check
3
+ # tau docker image tag check
4
4
  module DockerImageTagCheck
5
5
  # Backend method for docker image tag check.
6
6
  # @return [Boolean] does docker image tag exist?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau docker image tag
4
+ # tau docker image tag
5
5
  class DockerImageTag < SubCommandBase
6
6
  include LoggingModule
7
7
  include SystemModule
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker image tag latest
3
+ # tau docker image tag latest
4
4
  module DockerImageTagLatest
5
5
  # Backend method for docker image tag latest.
6
6
  # @return [String] latest docker image tag
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker image tag list
3
+ # tau docker image tag list
4
4
  module DockerImageTagList
5
5
  # Backend method for docker image tag list.
6
6
  # @return [Array] docker image tags
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau docker image uppdate
3
+ # tau docker image uppdate
4
4
  module DockerImageUpdate
5
5
  # Backend method for docker image update.
6
6
  def docker_image_update
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau git check clean
3
+ # tau git check clean
4
4
  module GitCheckClean
5
5
  # Backend method for git check clean.
6
6
  # @return [Boolean] is git workspace clean?
@@ -1,27 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau git check
4
+ # tau git check
5
5
  class GitCheck < SubCommandBase
6
6
  include LoggingModule
7
7
  include SystemModule
8
8
  include ConfigModule
9
9
  include GitCheckClean
10
- include GitCheckBit
10
+ include GitCheckHg
11
11
  include GitCheckWorkspace
12
12
 
13
- #
14
- # git check bit
15
- #
16
- desc 'bit', 'Check if we are on the git bit branch'
17
- long_desc <<-LONGDESC.gsub("\n", "\x5")
18
- Check if we are on the git bit branch
19
- LONGDESC
20
- # Check if we are on the git bit branch.
21
- def bit
22
- exit git_check_bit
23
- end
24
-
25
13
  #
26
14
  # git check clean
27
15
  #
@@ -34,6 +22,18 @@ module Takeltau
34
22
  exit git_check_clean
35
23
  end
36
24
 
25
+ #
26
+ # git check hg
27
+ #
28
+ desc 'hg', 'Check if we are on the git hg branch'
29
+ long_desc <<-LONGDESC.gsub("\n", "\x5")
30
+ Check if we are on the git hg branch
31
+ LONGDESC
32
+ # Check if we are on the git hg branch.
33
+ def hg
34
+ exit git_check_hg
35
+ end
36
+
37
37
  #
38
38
  # git check workspace
39
39
  #
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ # tau git check hg
4
+ module GitCheckHg
5
+ # Backend method for git check hg.
6
+ # @return [Boolean] are we on the git hg branch?
7
+ def git_check_hg
8
+ log.debug 'Check if we are on the git hg branch'
9
+
10
+ return false unless git_check_workspace
11
+
12
+ branch = _git_check_hg_get_branch
13
+ log.debug "We are on git branch \"#{branch}\""
14
+
15
+ branch == config.active['git_hg_branch']
16
+ end
17
+
18
+ private
19
+
20
+ # Get git branch.
21
+ def _git_check_hg_get_branch
22
+ cmd_get_branch =
23
+ config.active['cmd_git_check_hg_get_git_branch']
24
+ (run cmd_get_branch).chomp.split('/')[-1]
25
+ end
26
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # takeltau git check workspace
3
+ # tau git check workspace
4
4
  module GitCheckWorkspace
5
5
  # Backend method for git check workspace.
6
6
  # @return [Boolean] is this a git workspace?
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Takeltau
4
- # takeltau git
4
+ # tau git
5
5
  class Git < SubCommandBase
6
6
  desc 'check [COMMAND]', 'Check git state'
7
7
  subcommand 'check', GitCheck
@@ -0,0 +1,80 @@
1
+ # frozen_string_literal: true
2
+
3
+ # tau git lib
4
+ module GitLib
5
+ # Pull git workspace.
6
+ def git_lib_pull_workspace
7
+ log.info 'Pulling git workspace'
8
+
9
+ _git_lib_git_pull_origin_hg
10
+ end
11
+
12
+ # Push git workspace.
13
+ def git_lib_push_workspace(message)
14
+ log.info 'Pushing git workspace'
15
+
16
+ return false unless _git_lib_git_add_all
17
+ return false unless _git_lib_git_commit message
18
+ return false unless _git_lib_git_pull_origin_hg
19
+
20
+ _git_lib_git_push_origin_hg
21
+ end
22
+
23
+ private
24
+
25
+ # git add all.
26
+ def _git_lib_git_add_all
27
+ log.debug 'Adding all files to git'
28
+
29
+ cmd_git_add_all = config.active['cmd_git_lib_git_add_all']
30
+
31
+ return true if try cmd_git_add_all
32
+
33
+ log.error 'Unable to add all files to git'
34
+ false
35
+ end
36
+
37
+ # git commit.
38
+ def _git_lib_git_commit(message)
39
+ log.debug "Committing to git with message \"#{message}\""
40
+
41
+ cmd_git_commit = format(
42
+ config.active['cmd_git_lib_git_commit'],
43
+ message: message
44
+ )
45
+
46
+ return true if try cmd_git_commit
47
+
48
+ log.error 'Unable to commit to git'
49
+ false
50
+ end
51
+
52
+ # git pull origin hg.
53
+ def _git_lib_git_pull_origin_hg
54
+ log.info 'Pulling git hg branch from origin'
55
+ cmd_git_lib_git_pull_origin = format(
56
+ config.active['cmd_git_lib_git_pull_origin'],
57
+ main: config.active['git_hg_branch']
58
+ )
59
+
60
+ return true if (try cmd_git_lib_git_pull_origin).exitstatus.zero?
61
+
62
+ log.error 'Unable to pull git hg branch'
63
+ false
64
+ end
65
+
66
+ # git push origin hg.
67
+ def _git_lib_git_push_origin_hg
68
+ log.debug 'Pushing git hg branch to origin'
69
+
70
+ cmd_git_lib_git_push_origin = format(
71
+ config.active['cmd_git_lib_git_push_origin'],
72
+ main: config.active['git_hg_branch']
73
+ )
74
+
75
+ return true if (try cmd_git_lib_git_push_origin).exitstatus.zero?
76
+
77
+ log.error 'Unable to push git hg branch'
78
+ false
79
+ end
80
+ end
@@ -0,0 +1,56 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Takeltau
4
+ # tau hg
5
+ class Hg < SubCommandBase
6
+ include LoggingModule
7
+ include SystemModule
8
+ include ConfigModule
9
+ include GitCheckClean
10
+ include GitCheckHg
11
+ include GitCheckWorkspace
12
+ include GitLib
13
+ include HgExport
14
+ include HgPull
15
+ include HgPush
16
+
17
+ #
18
+ # hg export
19
+ #
20
+ desc 'export', 'Export hg repos'
21
+ long_desc <<-LONGDESC.gsub("\n", "\x5")
22
+ Export hg repos
23
+ LONGDESC
24
+ # Export hg repos.
25
+ def export
26
+ hgclone = hg_export
27
+ exit false if hgclone == false
28
+ say hgclone
29
+ true
30
+ end
31
+
32
+ #
33
+ # hg pull
34
+ #
35
+ desc 'pull', 'Pull hg repos'
36
+ long_desc <<-LONGDESC.gsub("\n", "\x5")
37
+ Pull hg repos
38
+ LONGDESC
39
+ # Pull hg repos.
40
+ def pull
41
+ exit hg_pull
42
+ end
43
+
44
+ #
45
+ # hg push
46
+ #
47
+ desc 'push', 'Push hg repos'
48
+ long_desc <<-LONGDESC.gsub("\n", "\x5")
49
+ Push hg repos
50
+ LONGDESC
51
+ # Push hg repos.
52
+ def push
53
+ exit hg_push
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ # tau hg export
4
+ module HgExport
5
+ # Backend method for hg export.
6
+ def hg_export
7
+ log.debug 'Export hg repos'
8
+
9
+ return false unless configured? %w[project_root_dir]
10
+
11
+ cmd_hg_export_repos = format(
12
+ config.active['cmd_hg_export_repos'],
13
+ root: config.active['project_root_dir']
14
+ )
15
+
16
+ run cmd_hg_export_repos
17
+ end
18
+ end