Skip to content

Commit 43cba41

Browse files
author
Peter Giacomo Lombardo
committed
Update release script with help text
1 parent aaf7b5e commit 43cba41

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

bin/aws-lambda/create_lambda_release.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22
# Script to make a new AWS Lambda Layer release on Github
33
# Requires the Github CLI to be installed and configured: https://github.com/cli/cli
44

5+
import os
56
import sys
67
import json
78
import distutils.spawn
89
from subprocess import check_output
910

1011
if len(sys.argv) != 2:
11-
raise ValueError('Please specify the layer version to release. e.g. "11"')
12+
raise ValueError('Please specify the layer version to release. e.g. "14"')
13+
14+
if sys.argv[1] in ['-h', '--help']:
15+
filename = os.path.basename(__file__)
16+
print("Usage: %s <version number>" % filename)
17+
print("Exampe: %s 14" % filename)
18+
print("")
19+
print("This will create a AWS Lambda release on Github such as:")
20+
print("https://github.com/instana/python-sensor/releases/tag/v14")
21+
1222

1323
# Check requirements first
1424
for cmd in ["gh"]:

0 commit comments

Comments
 (0)