Update gitignore and start changelog generator

This commit is contained in:
2022-12-28 23:17:23 -08:00
parent 3018fea9d9
commit 44b65b844f
2 changed files with 30 additions and 0 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Custom files
bundle.php
# Logs # Logs
logs logs
*.log *.log

27
gen-changelog Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/bash
#Validate input:
if [ -z "$1" ]; then
echo "Github user not provided" && exit 1
fi
if [ -z "$2" ]; then
echo "Github project not provided" && exit 1
fi
#Get token:
if [ -z "$CHANGELOG_GITHUB_TOKEN" ]; then
if [ ! -z "$3" ]; then
source "$3" || echo "Unable to fetch credentials, the file either does not exist, or is not an actual file." && exit 1
else
echo 'Unable to find your github credentials file, please double chek the file exists and has the $CHANGELOG_GITHUB_TOKEN variable set.' && exit 1
fi
else
echo 'Unable to find your github credentials token, please make sure your $CHANGELOG_GITHUB_TOKEN variable is set, or pass a path to a credentials file.' && exit 1
fi
#Check for output option:
$CLOUT = "./changelog.md"
#Generate changelog:
github_changelog_generator -u "$1" -p "$2" --output "$CLOUT"