-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·41 lines (34 loc) · 1.24 KB
/
run.sh
File metadata and controls
executable file
·41 lines (34 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
# Run script for GitHub Branch Analyzer
# This script runs the analyzer with the configured settings
# Check if .env file exists and source it
if [ -f .env ]; then
source .env
else
echo "Error: .env file not found. Please run ./configure.sh first."
exit 1
fi
# Check if required variables are set
if [ -z "$GITHUB_TOKEN" ] || [ -z "$GITHUB_REPO" ]; then
echo "Error: GITHUB_TOKEN and GITHUB_REPO must be set in .env file."
echo "Please run ./configure.sh to configure these variables."
exit 1
fi
echo "Running GitHub Branch Analyzer for repository: $GITHUB_REPO"
echo "Comparing branches: $MAIN_BRANCH and $RELEASE_BRANCH"
# Run the Python script
python github_branch_analyzer.py
# Check if the analysis was successful
if [ $? -eq 0 ]; then
echo "Analysis completed successfully!"
echo "Results saved to branch_data.json"
# Copy the data to the visualization directory
if [ -d "../git-branch-comparison-website" ]; then
cp branch_data.json ../git-branch-comparison-website/
echo "Data copied to visualization website directory."
else
echo "Note: Visualization website directory not found."
fi
else
echo "Error: Analysis failed. Please check the error messages above."
fi