sem 0.4.0 → 0.4.1
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/README.md +34 -9
- data/lib/sem/cli/shared_configs.rb +4 -2
- data/lib/sem/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 298acba8f8d2ddd6e926cdc7ca1c497ffea512b9
|
4
|
+
data.tar.gz: 0305c21b336f783cc0726a3d028442beed789898
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e02ec409e893ca38e37aae8d23779b76a9dfbe1601f6d898df8df58f2fe7c0e6edaf06eee3873a0e9c67230c4f5c097623ccf47148776884d96828ae50cec90a
|
7
|
+
data.tar.gz: 5024e6f26a9d567ad4db95a31adfafd60e9f228b16d1227be6570d416c9e61d2f88888405f894140fd96763d8b391ca9f4193ca6e9aae6321875cbf39848cac5
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# Semaphore CLI
|
2
2
|
|
3
|
+

|
4
|
+
|
3
5
|
[](https://semaphoreci.com/renderedtext/cli)
|
4
6
|
[](https://badge.fury.io/rb/sem)
|
5
7
|
|
6
|
-

|
7
|
-
|
8
8
|
__Note: The Semaphore CLI gem is still an alpha release.__
|
9
9
|
|
10
10
|
The Semaphore CLI is used to manage Semaphore projects from the command line.
|
@@ -13,10 +13,36 @@ For more info about Semaphore see <https://semaphoreci.com>
|
|
13
13
|
|
14
14
|
## Usage
|
15
15
|
|
16
|
-
|
16
|
+
First, install the gem on your local machine:
|
17
|
+
|
18
|
+
``` bash
|
19
|
+
$ gem install sem
|
20
|
+
```
|
21
|
+
|
22
|
+
Login to Semaphore:
|
23
|
+
|
24
|
+
``` bash
|
25
|
+
$ sem login --auth-token <your-auth-token>
|
26
|
+
```
|
27
|
+
|
28
|
+
Display the help screen:
|
29
|
+
|
30
|
+
``` txt
|
31
|
+
$ sem help
|
32
|
+
|
33
|
+
Usage: sem [command]
|
34
|
+
|
35
|
+
Command list, type sem help [command] for more details:
|
36
|
+
|
37
|
+
version Check cli version
|
38
|
+
login Log in to semaphore from the command line
|
39
|
+
logout Log out from semaphore
|
40
|
+
|
41
|
+
orgs Manage organizations
|
42
|
+
teams Manage teams and team membership
|
43
|
+
shared-configs Manage shared configurations
|
44
|
+
projects Manage projects
|
17
45
|
|
18
|
-
``` ruby
|
19
|
-
gem install sem
|
20
46
|
```
|
21
47
|
|
22
48
|
## Issues
|
@@ -27,11 +53,10 @@ For other issues, [submit a support ticket](https://semaphoreci.com/support).
|
|
27
53
|
|
28
54
|
[Contributors](https://github.com/renderedtext/cli/contributors).
|
29
55
|
|
30
|
-
##
|
31
|
-
|
32
|
-
Developing the CLI locally requires Ruby.
|
56
|
+
## Development
|
33
57
|
|
34
|
-
|
58
|
+
Developing the CLI locally requires Ruby >= 2.0. While developing please follow
|
59
|
+
the [CLI development guide](guides.md).
|
35
60
|
|
36
61
|
To run the CLI locally, use the `bundle exec sem`.
|
37
62
|
|
@@ -63,6 +63,7 @@ class Sem::CLI::SharedConfigs < Dracula
|
|
63
63
|
desc "add", "add a file to the shared configuration"
|
64
64
|
option "path-on-semaphore", :aliases => "p", :desc => "Path of the file in builds", :required => true
|
65
65
|
option "local-path", :aliases => "l", :desc => "Location of the file on the local machine", :required => true
|
66
|
+
option "encrypted", :desc => "Encrypt the file", :default => true, :type => :boolean
|
66
67
|
def add(shared_config_name)
|
67
68
|
shared_config = Sem::API::SharedConfig.find!(shared_config_name)
|
68
69
|
|
@@ -73,7 +74,7 @@ class Sem::CLI::SharedConfigs < Dracula
|
|
73
74
|
path = options["path-on-semaphore"]
|
74
75
|
content = File.read(local_path)
|
75
76
|
|
76
|
-
shared_config.add_config_file(:path => path, :content => content)
|
77
|
+
shared_config.add_config_file(:path => path, :content => content, :encrypted => options["encrypted"])
|
77
78
|
|
78
79
|
puts "Added #{path} to #{shared_config_name}"
|
79
80
|
end
|
@@ -107,10 +108,11 @@ class Sem::CLI::SharedConfigs < Dracula
|
|
107
108
|
desc "add", "add an environment variable to the shared configuration"
|
108
109
|
option :name, :aliases => "n", :desc => "Name of the variable", :required => true
|
109
110
|
option :content, :aliases => "c", :desc => "Content of the variable", :required => true
|
111
|
+
option :encrypted, :desc => "Encrypt the environment variable", :default => true, :type => :boolean
|
110
112
|
def add(shared_config_name)
|
111
113
|
shared_config = Sem::API::SharedConfig.find!(shared_config_name)
|
112
114
|
|
113
|
-
shared_config.add_env_var(:name => options[:name], :content => options[:content])
|
115
|
+
shared_config.add_env_var(:name => options[:name], :content => options[:content], :encrypted => options[:encrypted])
|
114
116
|
|
115
117
|
puts "Added #{options[:name]} to #{shared_config_name}"
|
116
118
|
end
|
data/lib/sem/version.rb
CHANGED