package_cloud 0.3.04 → 0.3.05
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 +68 -50
- data/lib/package_cloud/config_file.rb +4 -0
- data/lib/package_cloud/version.rb +1 -1
- data/markdown_lint_config.rb +2 -0
- data/package_cloud.gemspec +1 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '092367368ac01d15e6e21b8f34017ed5d1313ccd'
|
4
|
+
data.tar.gz: 2b802351b14a7d73f9dec8bf1c21930d0b06d7ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2faddb5c7c061833d26a27ee13d453ecdbfed1a681debca4a6d12f0c758b28c1f5e0ceb3c1b474f6cd79bf8597e44575ed2dacdbfe0c514fd21c33784412b95e
|
7
|
+
data.tar.gz: 5df6f89cf42745308e8f185cd23831eb611520f9f394b33eaa86b1e331ebf6b43b1406c85348d0dcf94c2b3802f69406ddaf26c0fd59c04eeb39c660751a3861
|
data/README.md
CHANGED
@@ -11,24 +11,28 @@ Only Ruby 2.x and greater is supported, please use version 0.2.45 for Ruby 1.9 s
|
|
11
11
|
|
12
12
|
The `package_cloud` command line client allows you to easily:
|
13
13
|
|
14
|
-
* Create Node.js, Debian, RPM, RubyGem, Python, and Maven package repositories
|
15
|
-
|
14
|
+
* Create Node.js, Debian, RPM, RubyGem, Python, and Maven package repositories
|
15
|
+
on [packagecloud](https://packagecloud.io).
|
16
|
+
* Upload Node.js, Debian, RPM, RubyGem, Python, and Java JAR/WAR/AAR packages
|
17
|
+
to your repositories.
|
16
18
|
* [Delete packages](https://packagecloud.io/docs#yank_pkg).
|
17
|
-
* [Promote packages](https://packagecloud.io/docs#promote_pkg) between
|
19
|
+
* [Promote packages](https://packagecloud.io/docs#promote_pkg) between
|
20
|
+
repositories.
|
18
21
|
* Upload a package signing GPG key.
|
19
22
|
* Create and delete [master and read
|
20
23
|
tokens](https://packagecloud.io/docs#token_auth) to control repository
|
21
24
|
access.
|
22
25
|
|
23
26
|
This tool is intended to be used on the command line either manually or in an
|
24
|
-
automated environment (like a build or CI process). See more examples on how
|
25
|
-
interface by visiting the
|
27
|
+
automated environment (like a build or CI process). See more examples on how
|
28
|
+
to use the command-line interface by visiting the
|
29
|
+
[CLI page](https://packagecloud.io/l/cli).
|
26
30
|
|
27
31
|
## Installation
|
28
32
|
|
29
33
|
Simply run:
|
30
34
|
|
31
|
-
|
35
|
+
gem install package_cloud
|
32
36
|
|
33
37
|
to install the command line client.
|
34
38
|
|
@@ -54,10 +58,11 @@ You can interact with our system programmatically as well by using our
|
|
54
58
|
|
55
59
|
### Creating a repository
|
56
60
|
|
57
|
-
You can create a package repository named 'example' on
|
61
|
+
You can create a package repository named 'example' on
|
62
|
+
[packagecloud](https://packagecloud.io) by running:
|
58
63
|
|
59
64
|
```
|
60
|
-
|
65
|
+
package_cloud repository create example
|
61
66
|
```
|
62
67
|
|
63
68
|
### Environment variables
|
@@ -69,6 +74,7 @@ that will override the settings found in `~/.packagecloud`:
|
|
69
74
|
token (available [here](https://packagecloud.io/api_token)). If set, the
|
70
75
|
CLI *will not* read the `~/.packagecloud` configuration file to get the API
|
71
76
|
token.
|
77
|
+
|
72
78
|
2. If and only if the `PACKAGECLOUD_TOKEN` variable is set, you may also set
|
73
79
|
`PACKAGECLOUD_URL`. This environment should only be used by
|
74
80
|
packagecloud:enterprise customers. It allows you to set the URL of the
|
@@ -84,7 +90,8 @@ repository you've created by using the `push` command.
|
|
84
90
|
Most package types require specifying a `distribution/version` pair when
|
85
91
|
uploading. See the examples that follow for more information.
|
86
92
|
|
87
|
-
Please note that packages will be available for download via the packagecloud
|
93
|
+
Please note that packages will be available for download via the packagecloud
|
94
|
+
web UI
|
88
95
|
immediately after they are uploaded, but they will not necessarily be
|
89
96
|
available for installation via a package manager immediately. This is because
|
90
97
|
our system regenerates the repository metadata needed by package managers as a
|
@@ -92,7 +99,8 @@ background job on our system. Jobs are added to a queue and processed.
|
|
92
99
|
Processing time depends on the number of packages in your repository and the
|
93
100
|
number of reindex jobs in front of yours.
|
94
101
|
|
95
|
-
The following examples will show an example user name of `example-user` and a
|
102
|
+
The following examples will show an example user name of `example-user` and a
|
103
|
+
repository
|
96
104
|
name of `example-repository`.
|
97
105
|
|
98
106
|
After the examples below, there will be an additional section documenting
|
@@ -100,10 +108,11 @@ important optional parameters you can specify when pushing packages.
|
|
100
108
|
|
101
109
|
#### Uploading a Debian package
|
102
110
|
|
103
|
-
You can upload a Debian package found at the path `/tmp/example.deb` for
|
111
|
+
You can upload a Debian package found at the path `/tmp/example.deb` for
|
112
|
+
Ubuntu Xenial by running:
|
104
113
|
|
105
114
|
```
|
106
|
-
|
115
|
+
package_cloud push example-user/example-repository/ubuntu/xenial /tmp/example.deb
|
107
116
|
```
|
108
117
|
|
109
118
|
This command will upload `/tmp/example.deb` to the `example-repository`
|
@@ -113,7 +122,7 @@ We also support Debian source packages (DSCs). You can upload a
|
|
113
122
|
`/tmp/example.dsc` for Ubuntu Xenial by running:
|
114
123
|
|
115
124
|
```
|
116
|
-
|
125
|
+
package_cloud push example-user/example-repository/ubuntu/xenial /tmp/example.dsc
|
117
126
|
```
|
118
127
|
|
119
128
|
Note that all files associated with the DSC (like source tarballs, patches,
|
@@ -129,7 +138,7 @@ You can upload an RPM package found at the path `/tmp/example.rpm` for CentOS
|
|
129
138
|
6 by running:
|
130
139
|
|
131
140
|
```
|
132
|
-
|
141
|
+
package_cloud push example-user/example-repository/el/6 /tmp/example.rpm
|
133
142
|
```
|
134
143
|
|
135
144
|
This command will upload `/tmp/example.rpm` to the `example-repository`
|
@@ -146,7 +155,7 @@ You can upload a RubyGem package found at the path `/tmp/example.gem` by
|
|
146
155
|
running:
|
147
156
|
|
148
157
|
```
|
149
|
-
|
158
|
+
package_cloud push example-user/example-repository /tmp/example.gem
|
150
159
|
```
|
151
160
|
|
152
161
|
This command will upload `/tmp/example.gem` to the `example-repository`
|
@@ -161,7 +170,7 @@ You can upload a Python package found at the path `/tmp/example.whl` by
|
|
161
170
|
running:
|
162
171
|
|
163
172
|
```
|
164
|
-
|
173
|
+
package_cloud push example-user/example-repository/python /tmp/example.whl
|
165
174
|
```
|
166
175
|
|
167
176
|
This command will upload `/tmp/example.whl` to the `example-repository`
|
@@ -174,7 +183,7 @@ eggs in PyPI repositories.
|
|
174
183
|
If you'd like to upload a Python egg despite this, you can do so by running:
|
175
184
|
|
176
185
|
```
|
177
|
-
|
186
|
+
package_cloud push example-user/example-repository/python /tmp/example.egg
|
178
187
|
```
|
179
188
|
|
180
189
|
#### Uploading a Java JAR, WAR, or AAR package
|
@@ -183,27 +192,29 @@ You can upload a Java JAR package found at the path `/tmp/example.jar` by
|
|
183
192
|
running:
|
184
193
|
|
185
194
|
```
|
186
|
-
|
195
|
+
package_cloud push example-user/example-repository/java/maven2 /tmp/example.jar
|
187
196
|
```
|
188
197
|
|
189
198
|
WAR files can be uploaded the same way.
|
190
199
|
|
191
200
|
It is important to note that in some cases (for example: 'fat JARs', or JARs
|
192
|
-
without `pom.xml` files, etc) our system will not be able to automatically
|
201
|
+
without `pom.xml` files, etc) our system will not be able to automatically
|
202
|
+
detect
|
193
203
|
the [Maven coordinates](https://maven.apache.org/pom.html#Maven_Coordinates).
|
194
204
|
In these cases you will receive an error, and you should specify the
|
195
205
|
coordinates manually on the command line:
|
196
206
|
|
197
207
|
```
|
198
|
-
|
208
|
+
package_cloud push example-user/example-repository/java/maven2 /tmp/example.jar --coordinates=com.mygroup:packagename:1.0.2
|
199
209
|
```
|
200
210
|
|
201
211
|
#### Uploading a Node.js package
|
202
212
|
|
203
|
-
To upload a Node.js package located at `/tmp/test-1.0.0.tgz` to a packagecloud
|
213
|
+
To upload a Node.js package located at `/tmp/test-1.0.0.tgz` to a packagecloud
|
214
|
+
NPM registry called `example-user/example-repository`:
|
204
215
|
|
205
216
|
```
|
206
|
-
|
217
|
+
package_cloud push example-user/example-repository/node /tmp/example-1.0.tgz
|
207
218
|
```
|
208
219
|
|
209
220
|
#### Additional options
|
@@ -225,7 +236,8 @@ more advanced use cases:
|
|
225
236
|
continue uploading packages.
|
226
237
|
* `--coordinates` - This flag is used for Java JARs or WARs which do not have
|
227
238
|
an internal `pom.xml` specifying the Maven coordinates. You can specify your
|
228
|
-
own Maven coordinates for this file using this flag:
|
239
|
+
own Maven coordinates for this file using this flag:
|
240
|
+
`--coordinates=com.mygroup:packagename:1.0.2`.
|
229
241
|
* `--config` - This flag is used to specify a custom configuration file path
|
230
242
|
for the CLI. This file specifies the website URL and your API token. This is
|
231
243
|
default to `~/.packagecloud`.
|
@@ -254,7 +266,7 @@ uploaded for Ubuntu Xenial from the repository `example-repository` owned by
|
|
254
266
|
the user `example-user` by running the following command:
|
255
267
|
|
256
268
|
```
|
257
|
-
|
269
|
+
package_cloud yank example-user/example-repository/ubuntu/xenial example_1.0.1-1_amd64.deb
|
258
270
|
```
|
259
271
|
|
260
272
|
This will delete the package and trigger a reindex of the repository's
|
@@ -267,7 +279,7 @@ uploaded for CentOS 6 from the repository `example-repository` owned by
|
|
267
279
|
the user `example-user` by running the following command:
|
268
280
|
|
269
281
|
```
|
270
|
-
|
282
|
+
package_cloud yank example-user/example-repository/el/6 example-1.0-1.x86_64.rpm
|
271
283
|
```
|
272
284
|
|
273
285
|
This will delete the package and trigger a reindex of the repository's
|
@@ -280,7 +292,7 @@ repository `example-repository` owned by the user `example-user`
|
|
280
292
|
by running the following command:
|
281
293
|
|
282
294
|
```
|
283
|
-
|
295
|
+
package_cloud yank example-user/example-repository example-1.0.gem
|
284
296
|
```
|
285
297
|
|
286
298
|
This will delete the package and trigger a reindex of the repository's
|
@@ -293,7 +305,7 @@ You can delete a Python package named `example-1.0.1.whl` from the repository
|
|
293
305
|
command:
|
294
306
|
|
295
307
|
```
|
296
|
-
|
308
|
+
package_cloud yank example-user/example-repository/python example-1.0.1.whl
|
297
309
|
```
|
298
310
|
|
299
311
|
This will delete the package and trigger a reindex of the repository's metadata.
|
@@ -301,12 +313,13 @@ Python eggs and sdists can be deleted in a similar manner.
|
|
301
313
|
|
302
314
|
#### Deleting a Java package
|
303
315
|
|
304
|
-
You can delete a Java package named `example-1.0.3.jar` with the group
|
316
|
+
You can delete a Java package named `example-1.0.3.jar` with the group
|
317
|
+
`com.groupid` from the repository
|
305
318
|
`example-repository` owned by the user `example-user` by running the following
|
306
319
|
command:
|
307
320
|
|
308
321
|
```
|
309
|
-
|
322
|
+
package_cloud yank example-user/example-repository/java com.groupid/example-1.0.3.jar
|
310
323
|
```
|
311
324
|
|
312
325
|
This will delete the package and trigger a reindex of the repository's
|
@@ -319,20 +332,21 @@ You can delete a Node.js package named `example-1.0.tgz` from the NPM registry
|
|
319
332
|
command:
|
320
333
|
|
321
334
|
```
|
322
|
-
|
335
|
+
package_cloud yank example-user/example-repository/node example-1.0.tgz
|
323
336
|
```
|
324
337
|
|
325
338
|
If the package has a scope, you can delete it by passing the scope like so:
|
326
339
|
|
327
340
|
```
|
328
|
-
|
341
|
+
package_cloud yank example-user/example-repository/node @scoped-user/example-1.0.tgz
|
329
342
|
```
|
330
343
|
|
331
344
|
This will delete the package and trigger a reindex of the registry's
|
332
345
|
metadata.
|
333
346
|
|
334
347
|
Note that deleting Node.js packages can have unexpected side effects when
|
335
|
-
mixed with
|
348
|
+
mixed with
|
349
|
+
[NPM distribution tags](https://docs.npmjs.com/getting-started/using-tags). Read
|
336
350
|
more about how [promoting on packagecloud can affect dist tags
|
337
351
|
here.](https://packagecloud.io/docs/#node_promote)
|
338
352
|
|
@@ -358,7 +372,7 @@ your system at `/tmp/gpg.key` for the repository `example-repository` owned by
|
|
358
372
|
the user `example-user`, you can run the following command:
|
359
373
|
|
360
374
|
```
|
361
|
-
|
375
|
+
package_cloud gpg_key create example-user/example-repository /tmp/gpg.key
|
362
376
|
```
|
363
377
|
|
364
378
|
Note that if you attempt to upload a private key to packagecloud, we will
|
@@ -371,7 +385,7 @@ You can list the GPG keys associated with the repository `example-repository`
|
|
371
385
|
owned by user `example-user` by running the following command:
|
372
386
|
|
373
387
|
```
|
374
|
-
|
388
|
+
package_cloud gpg_key list example-user/example-repository
|
375
389
|
```
|
376
390
|
|
377
391
|
The key name specified in the output of this command is the key name you should
|
@@ -385,7 +399,7 @@ named `example-repository` and owned by the user `example-user` by running the
|
|
385
399
|
following command:
|
386
400
|
|
387
401
|
```
|
388
|
-
|
402
|
+
package_cloud gpg_key destroy example-user/example-repository example-user-example-repository-56D06.pub.gpg
|
389
403
|
```
|
390
404
|
|
391
405
|
You can get the key name for a key you'd like to delete by using the GPG key
|
@@ -395,35 +409,38 @@ list command above.
|
|
395
409
|
|
396
410
|
Package promotion is a feature which can be used to easily move packages
|
397
411
|
between repositories. This is useful for moving a package from a private
|
398
|
-
staging repository to a public production ready repository during a software
|
399
|
-
workflow.
|
412
|
+
staging repository to a public production ready repository during a software
|
413
|
+
release workflow.
|
400
414
|
|
401
415
|
To move a package named `example_1.0-1_amd64.deb` from the user
|
402
416
|
`example-user`'s repository named `repo1` over to the same users repository
|
403
417
|
named `repo2`, you would issue the following command:
|
404
418
|
|
405
419
|
```
|
406
|
-
|
420
|
+
package_cloud promote example-user/repo1/ubuntu/xenial example_1.0-1_amd64.deb example-user/repo2
|
407
421
|
```
|
408
422
|
|
409
|
-
If the package has a scope (Node.js packages), you can promote it by including
|
423
|
+
If the package has a scope (Node.js packages), you can promote it by including
|
424
|
+
the scope like so:
|
410
425
|
|
411
426
|
```
|
412
|
-
|
427
|
+
package_cloud promote example-user/repo1/node @scoped-user/example-1.0.tgz example-user/repo2
|
413
428
|
```
|
414
429
|
|
415
|
-
If the package has a group (Java packages), you can promote it by
|
430
|
+
If the package has a group (Java packages), you can promote it by
|
431
|
+
including the group like so:
|
416
432
|
|
417
433
|
```
|
418
|
-
|
434
|
+
package_cloud promote example-user/repo1/java com.groupid/jake-2.3.jar example-user/repo2
|
419
435
|
```
|
420
436
|
|
421
|
-
After the package is moved, a reindex will be triggered for both `repo1`
|
422
|
-
`repo2`.
|
437
|
+
After the package is moved, a reindex will be triggered for both `repo1`
|
438
|
+
and `repo2`.
|
423
439
|
|
424
440
|
Note that promoting Node.js packages can have unexpected side effects when
|
425
|
-
mixed with
|
426
|
-
|
441
|
+
mixed with
|
442
|
+
[NPM distribution tags](https://docs.npmjs.com/getting-started/using-tags).
|
443
|
+
Read more about how [promoting on packagecloud can affect dist tags
|
427
444
|
here](https://packagecloud.io/docs/#node_promote).
|
428
445
|
|
429
446
|
### Creating, deleting, and listing master and read tokens
|
@@ -451,7 +468,7 @@ you can create a master token name "Example-Token" for the repository
|
|
451
468
|
command:
|
452
469
|
|
453
470
|
```
|
454
|
-
|
471
|
+
package_cloud master_token create example-user/example-repository Example-Token
|
455
472
|
```
|
456
473
|
|
457
474
|
#### Listing master tokens
|
@@ -461,7 +478,7 @@ You can list all master tokens associated with the repository
|
|
461
478
|
command:
|
462
479
|
|
463
480
|
```
|
464
|
-
|
481
|
+
package_cloud master_token list example-user/example-repository
|
465
482
|
```
|
466
483
|
|
467
484
|
#### Deleting master tokens
|
@@ -471,7 +488,7 @@ repository `example-repository` owned by the user `example-user` by running
|
|
471
488
|
the following command:
|
472
489
|
|
473
490
|
```
|
474
|
-
|
491
|
+
package_cloud master_token destroy example-user/example-repository Example-Token
|
475
492
|
```
|
476
493
|
|
477
494
|
This will also automatically delete all read tokens associated with this
|
@@ -480,4 +497,5 @@ tokens.
|
|
480
497
|
|
481
498
|
## Still need help?
|
482
499
|
|
483
|
-
Feel free to reach out to
|
500
|
+
Feel free to reach out to
|
501
|
+
[support@packagecloud.io](mailto:support@packagecloud.io) with questions.
|
@@ -15,6 +15,10 @@ module PackageCloud
|
|
15
15
|
|
16
16
|
def read_or_create
|
17
17
|
if ENV["PACKAGECLOUD_TOKEN"]
|
18
|
+
if ENV["PACKAGECLOUD_TOKEN"].length < 48
|
19
|
+
puts "Found PACKAGECLOUD_TOKEN environment variable but is empty or too short! Visit https://packagecloud.io/api_token and confirm it is correct."
|
20
|
+
exit!
|
21
|
+
end
|
18
22
|
@token = ENV["PACKAGECLOUD_TOKEN"]
|
19
23
|
@url = URI(ENV["PACKAGECLOUD_URL"]) if ENV["PACKAGECLOUD_URL"]
|
20
24
|
output_host_and_token
|
data/package_cloud.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: package_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.05
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Damato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -108,6 +108,20 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: mdl
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
111
125
|
description: The https://packagecloud.io CLI for uploading Node.js, Debian, RPM, RubyGem,
|
112
126
|
Python, and Java packages. Check our website or the RubyDoc documentation for detailed
|
113
127
|
information.
|
@@ -143,6 +157,7 @@ files:
|
|
143
157
|
- lib/package_cloud/util.rb
|
144
158
|
- lib/package_cloud/validator.rb
|
145
159
|
- lib/package_cloud/version.rb
|
160
|
+
- markdown_lint_config.rb
|
146
161
|
- package_cloud.gemspec
|
147
162
|
homepage: https://packagecloud.io
|
148
163
|
licenses:
|
@@ -164,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
179
|
version: '0'
|
165
180
|
requirements: []
|
166
181
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
182
|
+
rubygems_version: 2.6.13
|
168
183
|
signing_key:
|
169
184
|
specification_version: 4
|
170
185
|
summary: The https://packagecloud.io CLI for uploading Node.js, Debian, RPM, RubyGem,
|