mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-21 00:42:56 +00:00
Update repo
This commit is contained in:
@@ -11,6 +11,9 @@ CURL_COMMON_OPTIONS=(
|
||||
--write-out "|%{http_code}"
|
||||
--resolve "packages.termux.dev:443:216.18.208.170"
|
||||
)
|
||||
|
||||
CURL_ADDITIONAL_OPTIONS=()
|
||||
|
||||
# Function for deleting temporary directory with uploaded files from
|
||||
# the server.
|
||||
aptly_delete_dir() {
|
||||
@@ -18,7 +21,7 @@ aptly_delete_dir() {
|
||||
|
||||
curl_response=$(
|
||||
curl \
|
||||
"${CURL_COMMON_OPTIONS[@]}" \
|
||||
"${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \
|
||||
--request DELETE \
|
||||
${REPOSITORY_URL}/files/${REPOSITORY_NAME}-${GITHUB_SHA}
|
||||
)
|
||||
@@ -33,7 +36,7 @@ aptly_delete_dir() {
|
||||
aptly_upload_file() {
|
||||
local filename="$1"
|
||||
curl_response=$(curl \
|
||||
"${CURL_COMMON_OPTIONS[@]}" \
|
||||
"${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \
|
||||
--request POST \
|
||||
--form file=@${filename} \
|
||||
${REPOSITORY_URL}/files/${REPOSITORY_NAME}-${GITHUB_SHA} || true
|
||||
@@ -62,7 +65,7 @@ aptly_add_to_repo() {
|
||||
echo "[$(date +%H:%M:%S)] Adding packages to repository '$REPOSITORY_NAME'..."
|
||||
curl_response=$(
|
||||
curl \
|
||||
"${CURL_COMMON_OPTIONS[@]}" \
|
||||
"${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \
|
||||
--max-time 300 \
|
||||
--request POST \
|
||||
${REPOSITORY_URL}/repos/${REPOSITORY_NAME}/file/${REPOSITORY_NAME}-${GITHUB_SHA} || true
|
||||
@@ -95,7 +98,7 @@ aptly_publish_repo() {
|
||||
echo "[$(date +%H:%M:%S)] Publishing repository changes..."
|
||||
curl_response=$(
|
||||
curl \
|
||||
"${CURL_COMMON_OPTIONS[@]}" \
|
||||
"${CURL_COMMON_OPTIONS[@]}" "${CURL_ADDITIONAL_OPTIONS[@]}" \
|
||||
--max-time 300 \
|
||||
--header 'Content-Type: application/json' \
|
||||
--request PUT \
|
||||
|
||||
Reference in New Issue
Block a user