Skip to content

Commit

Permalink
Merge pull request #8 from jitsecurity/jit-shlomi-patch-1sc-19672-cre…
Browse files Browse the repository at this point in the history
…ate-a-tool-to-generate-teams-from-github-part4

make the Makefile more robust across platforms
  • Loading branch information
k-shlomi authored Aug 27, 2023
2 parents 67b9022 + bf1f587 commit 2012a72
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
SHELL := /bin/bash

install:
@if ! command -v python3 >/dev/null 2>&1; then \
echo "Python 3 is required but it's not installed. Please install Python 3 and try again." >&2; \
echo "Python 3 is required but it's not installed. Please install Python 3 (or ensure 'python3' command is available) and try again." >&2; \
exit 1; \
fi
@if [ ! -d "venv-jit" ]; then \
python3 -m venv venv-jit; \
fi
source venv-jit/bin/activate && pip install -r requirements.txt
. venv-jit/bin/activate && pip install -r requirements.txt

configure:
@read -p "Enter GitHub organization name: " org_name; \
Expand All @@ -21,10 +23,10 @@ configure:
echo "TEAM_WILDCARD_TO_EXCLUDE=$$topics_to_exclude" >> .env

create-teams:
source venv-jit/bin/activate && \
. venv-jit/bin/activate && \
export PYTHONPATH=$(CURDIR) && \
python src/utils/github_topics_to_json_file.py && \
python src/scripts/create_teams.py teams.json
python3 src/utils/github_topics_to_json_file.py && \
python3 src/scripts/create_teams.py teams.json

help:
@echo "Usage: make [target]"
Expand Down

0 comments on commit 2012a72

Please sign in to comment.