Skip to content

Commit

Permalink
feat: log version
Browse files Browse the repository at this point in the history
  • Loading branch information
krestaino committed Jan 8, 2024
1 parent 1396d6d commit f3fe277
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.1
19 changes: 19 additions & 0 deletions build_and_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Ensure the script stops if there is an error
set -e

# Read version from the VERSION file
VERSION=$(cat VERSION)

# Build the Docker image with the version tag
docker build -t krestaino/sptnr:$VERSION .

# Tag the built image as latest
docker tag krestaino/sptnr:$VERSION krestaino/sptnr:latest

# Push both tags to the Docker registry
docker push krestaino/sptnr:$VERSION
docker push krestaino/sptnr:latest

echo "Docker images tagged and pushed: $VERSION and latest"
7 changes: 7 additions & 0 deletions sptnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,20 @@ def format(self, record):
help="limit to processing [NUM] artists from the start index",
)

parser.add_argument(
"-v", "--version", action="version", version=f"%(prog)s {__version__}"
)


args = parser.parse_args()

ARTIST_IDs = args.artist if args.artist else []
ALBUM_IDs = args.album if args.album else []
START = args.start
LIMIT = args.limit

logging.info(f"{BOLD}Version:{RESET} {LIGHT_YELLOW}sptnr v{__version__}{RESET}")

if args.preview:
logging.info(f"{LIGHT_YELLOW}Preview mode, no changes will be made.{RESET}")
PREVIEW = 1
Expand Down

0 comments on commit f3fe277

Please sign in to comment.