Skip to content

Commit

Permalink
ci: generate proper id
Browse files Browse the repository at this point in the history
  • Loading branch information
Aetherinox committed Oct 27, 2024
1 parent 8874cec commit a25a3ce
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/bl-block.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ COUNT_TOTAL_IP=0 # number of single IPs (
BLOCKS_COUNT_TOTAL_IP=0 # number of ips for one particular file
BLOCKS_COUNT_TOTAL_SUBNET=0 # number of subnets for one particular file
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/bl-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ COUNT_TOTAL_IP=0 # number of single IPs (
BLOCKS_COUNT_TOTAL_IP=0 # number of ips for one particular file
BLOCKS_COUNT_TOTAL_SUBNET=0 # number of subnets for one particular file
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/bl-html.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ COUNT_LINES=0 # number of lines in doc
COUNT_TOTAL_SUBNET=0 # number of IPs in all subnets combined
COUNT_TOTAL_IP=0 # number of single IPs (counts each line)
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/bl-htmlip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ COUNT_TOTAL_IP=0 # number of single IPs (
BLOCKS_COUNT_TOTAL_IP=0 # number of ips for one particular file
BLOCKS_COUNT_TOTAL_SUBNET=0 # number of subnets for one particular file
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/bl-json.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ COUNT_TOTAL_IP=0 # number of single IPs (
BLOCKS_COUNT_TOTAL_IP=0 # number of ips for one particular file
BLOCKS_COUNT_TOTAL_SUBNET=0 # number of subnets for one particular file
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down
5 changes: 3 additions & 2 deletions .github/scripts/bl-master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ COUNT_TOTAL_IP=0 # number of single IPs (
BLOCKS_COUNT_TOTAL_IP=0 # number of ips for one particular file
BLOCKS_COUNT_TOTAL_SUBNET=0 # number of subnets for one particular file
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand All @@ -88,7 +89,7 @@ TEMPL_EXP=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP
TEMP_URL_SRC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/url-source/${TEMPL_ID}.txt")
REGEX_URL='^(https?|ftp|file)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]\.[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]$'
REGEX_ISNUM='^[0-9]+$'

$(basename -- "$TEMPL_ID")
# #
# Default Values
# #
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/bl-plain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ COUNT_LINES=0 # number of lines in doc
COUNT_TOTAL_SUBNET=0 # number of IPs in all subnets combined
COUNT_TOTAL_IP=0 # number of single IPs (counts each line)
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down
3 changes: 2 additions & 1 deletion .github/scripts/bl-spf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ COUNT_TOTAL_IP=0 # number of single IPs (
BLOCKS_COUNT_TOTAL_IP=0 # number of ips for one particular file
BLOCKS_COUNT_TOTAL_SUBNET=0 # number of subnets for one particular file
TEMPL_NOW=`date -u` # get current date in utc format
TEMPL_ID="${APP_FILE_PERM//[^[:alnum:]]/_}" # ipset id, /description/* and /category/* files must match this value
TEMPL_ID=$(basename -- ${APP_FILE_PERM}) # ipset id, get base filename
TEMPL_ID="${TEMPL_ID//[^[:alnum:]]/_}" # ipset id, only allow alphanum and underscore, /description/* and /category/* files must match this value
TEMPL_UUID=$(uuidgen -m -N "${TEMPL_ID}" -n @url) # uuid associated to each release
APP_AGENT="Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"
TEMPL_DESC=$(curl -sSL -A "${APP_AGENT}" "https://raw.githubusercontent.com/${APP_REPO}/${APP_REPO_BRANCH}/.github/descriptions/${TEMPL_ID}.txt")
Expand Down

0 comments on commit a25a3ce

Please sign in to comment.