Skip to content

Commit 7bb1410

Browse files
authored
fixed build script and README formatting (#12)
1 parent 799e95b commit 7bb1410

File tree

2 files changed

+34
-35
lines changed

2 files changed

+34
-35
lines changed

README.rst

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Socket API v0 - https://docs.socket.dev/reference/introduction-to-socket-api
1212
Initializing the module
1313
-----------------------
1414

15-
.. code-block::
15+
.. code-block:: python
1616
1717
from socketdev import socketdev
1818
socket = socketdev(token="REPLACE_ME", timeout=30)
@@ -32,7 +32,7 @@ Retrieve the package information for a purl post
3232

3333
**Usage:**
3434

35-
.. code-block::
35+
.. code-block:: python
3636
3737
from socketdev import socketdev
3838
socket = socketdev(token="REPLACE_ME")
@@ -53,12 +53,12 @@ Retrieve the package information for a purl post
5353
- **components (array{dict})** - The components list of packages urls
5454

5555
export.cdx_bom(org_slug, id, query_params)
56-
"""""""""""""""""""""""""""""""""""""""""
56+
""""""""""""""""""""""""""""""""""""""""""
5757
Export a Socket SBOM as a CycloneDX SBOM
5858

5959
**Usage:**
6060

61-
.. code-block::
61+
.. code-block:: python
6262
6363
from socketdev import socketdev
6464
from socketdev.export import ExportQueryParams
@@ -82,12 +82,12 @@ Export a Socket SBOM as a CycloneDX SBOM
8282
- **project_id (str)** - Filter by project ID
8383

8484
export.spdx_bom(org_slug, id, query_params)
85-
""""""""""""""""""""""""""""""""""""""""""
85+
"""""""""""""""""""""""""""""""""""""""""""
8686
Export a Socket SBOM as an SPDX SBOM
8787

8888
**Usage:**
8989

90-
.. code-block::
90+
.. code-block:: python
9191
9292
from socketdev import socketdev
9393
from socketdev.export import ExportQueryParams
@@ -116,7 +116,7 @@ Retrieve the Fullscans information for around Organization
116116

117117
**Usage:**
118118

119-
.. code-block::
119+
.. code-block:: python
120120
121121
from socketdev import socketdev
122122
socket = socketdev(token="REPLACE_ME")
@@ -132,7 +132,7 @@ Create a full scan from a set of package manifest files. Returns a full scan inc
132132

133133
**Usage:**
134134

135-
.. code-block::
135+
.. code-block:: python
136136
137137
from socketdev import socketdev
138138
socket = socketdev(token="REPLACE_ME")
@@ -190,7 +190,7 @@ Delete an existing full scan.
190190

191191
**Usage:**
192192

193-
.. code-block::
193+
.. code-block:: python
194194
195195
from socketdev import socketdev
196196
socket = socketdev(token="REPLACE_ME")
@@ -207,7 +207,7 @@ Stream a diff between two full scans. Returns a scan diff.
207207

208208
**Usage:**
209209

210-
.. code-block::
210+
.. code-block:: python
211211
212212
from socketdev import socketdev
213213
socket = socketdev(token="REPLACE_ME")
@@ -226,7 +226,7 @@ Stream all SBOM artifacts for a full scan.
226226

227227
**Usage:**
228228

229-
.. code-block::
229+
.. code-block:: python
230230
231231
from socketdev import socketdev
232232
socket = socketdev(token="REPLACE_ME")
@@ -243,7 +243,7 @@ Get metadata for a single full scan
243243

244244
**Usage:**
245245

246-
.. code-block::
246+
.. code-block:: python
247247
248248
from socketdev import socketdev
249249
socket = socketdev(token="REPLACE_ME")
@@ -260,7 +260,7 @@ Retrieve the dependencies for the organization associated with the API Key
260260

261261
**Usage:**
262262

263-
.. code-block::
263+
.. code-block:: python
264264
265265
from socketdev import socketdev
266266
socket = socketdev(token="REPLACE_ME")
@@ -277,7 +277,7 @@ Retrieve the dependencies for the organization associated with the API Key
277277

278278
**Usage:**
279279

280-
.. code-block::
280+
.. code-block:: python
281281
282282
from socketdev import socketdev
283283
socket = socketdev(token="REPLACE_ME")
@@ -301,7 +301,7 @@ Get a list of information about the tracked repositores
301301

302302
**Usage:**
303303

304-
.. code-block::
304+
.. code-block:: python
305305
306306
from socketdev import socketdev
307307
socket = socketdev(token="REPLACE_ME")
@@ -320,7 +320,7 @@ Create a new Socket Repository
320320

321321
**Usage:**
322322

323-
.. code-block::
323+
.. code-block:: python
324324
325325
from socketdev import socketdev
326326
socket = socketdev(token="REPLACE_ME")
@@ -350,7 +350,7 @@ Get a list of information about the tracked repositores
350350

351351
**Usage:**
352352

353-
.. code-block::
353+
.. code-block:: python
354354
355355
from socketdev import socketdev
356356
socket = socketdev(token="REPLACE_ME")
@@ -362,7 +362,7 @@ Update an existing Socket Repository
362362
363363
**Usage:**
364364
365-
.. code-block::
365+
.. code-block:: python
366366
367367
from socketdev import socketdev
368368
socket = socketdev(token="REPLACE_ME")
@@ -392,7 +392,7 @@ Delete a Socket Repository
392392
393393
**Usage:**
394394
395-
.. code-block::
395+
.. code-block:: python
396396
397397
from socketdev import socketdev
398398
socket = socketdev(token="REPLACE_ME")
@@ -409,7 +409,7 @@ Retrieve the Socket.dev org information
409409
410410
**Usage:**
411411
412-
.. code-block::
412+
.. code-block:: python
413413
414414
from socketdev import socketdev
415415
socket = socketdev(token="REPLACE_ME")
@@ -421,7 +421,7 @@ Retrieve the the current quota available for your API Key
421421
422422
**Usage:**
423423
424-
.. code-block::
424+
.. code-block:: python
425425
426426
from socketdev import socketdev
427427
socket = socketdev(token="REPLACE_ME")
@@ -433,7 +433,7 @@ Retrieve the Socket Organization Settings
433433
434434
**Usage:**
435435
436-
.. code-block::
436+
.. code-block:: python
437437
438438
from socketdev import socketdev
439439
socket = socketdev(token="REPLACE_ME")
@@ -445,7 +445,7 @@ Retrieve the supported types of manifest files for creating a report
445445
446446
**Usage:**
447447
448-
.. code-block::
448+
.. code-block:: python
449449
450450
from socketdev import socketdev
451451
socket = socketdev(token="REPLACE_ME")
@@ -457,7 +457,7 @@ Retrieve the list of all reports for the organization
457457
458458
**Usage:**
459459
460-
.. code-block::
460+
.. code-block:: python
461461
462462
from socketdev import socketdev
463463
socket = socketdev(token="REPLACE_ME")
@@ -473,7 +473,7 @@ Delete the specified report
473473
474474
**Usage:**
475475
476-
.. code-block::
476+
.. code-block:: python
477477
478478
from socketdev import socketdev
479479
socket = socketdev(token="REPLACE_ME")
@@ -489,7 +489,7 @@ Retrieve the information for a Project Health Report
489489
490490
**Usage:**
491491
492-
.. code-block::
492+
.. code-block:: python
493493
494494
from socketdev import socketdev
495495
socket = socketdev(token="REPLACE_ME")
@@ -505,7 +505,7 @@ Create a new project health report with the provided files
505505
506506
**Usage:**
507507
508-
.. code-block::
508+
.. code-block:: python
509509
510510
from socketdev import socketdev
511511
socket = socketdev(token="REPLACE_ME")
@@ -524,7 +524,7 @@ Get a list of information about the tracked repositores
524524
525525
**Usage:**
526526
527-
.. code-block::
527+
.. code-block:: python
528528
529529
from socketdev import socketdev
530530
socket = socketdev(token="REPLACE_ME")
@@ -536,7 +536,7 @@ Retrieve the information for a SBOM Report
536536
537537
**Usage:**
538538
539-
.. code-block::
539+
.. code-block:: python
540540
541541
from socketdev import socketdev
542542
socket = socketdev(token="REPLACE_ME")
@@ -548,7 +548,7 @@ Retrieve the Issues associated with a package and version.
548548
549549
**Usage:**
550550
551-
.. code-block::
551+
.. code-block:: python
552552
553553
from socketdev import socketdev
554554
socket = socketdev(token="REPLACE_ME")
@@ -565,7 +565,7 @@ Retrieve the Issues associated with a package and version.
565565
566566
**Usage:**
567567
568-
.. code-block::
568+
.. code-block:: python
569569
570570
from socketdev import socketdev
571571
socket = socketdev(token="REPLACE_ME")

scripts/build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
VERSION=$(grep -o "__version__.*" socketdev/__init__.py | awk '{print $3}' | tr -d "'" | tr -d '\r')
3+
VERSION=$(grep -o "__version__.*" socketdev/__init__.py | awk '{print $3}' | sed 's/"//g' | sed "s/'//g" | tr -d '\r')
44
ENABLE_PYPI_BUILD=$1
55

66
if [ -z $ENABLE_PYPI_BUILD ]; then
@@ -16,7 +16,6 @@ if [ "$ENABLE_PYPI_BUILD" = "pypi-prod=enable" ]; then
1616
else
1717
echo "Doing test build of version $VERSION"
1818
python -m build --wheel --sdist \
19-
&& ls dist/*$VERSION*\
20-
&& twine upload --repository testpypi "dist/*$VERSION*"
19+
&& ls dist/*${VERSION}* \
20+
&& twine upload -r testpypi dist/*${VERSION}*
2121
fi
22-

0 commit comments

Comments
 (0)