Compare commits
22 Commits
Author | SHA1 | Date | |
---|---|---|---|
f374b1bfa1 | |||
0e6b0e0879 | |||
3a353f4062 | |||
e0258d397b | |||
e8ac353453
|
|||
552abdd980 | |||
935007dd86 | |||
2cd1d053f0 | |||
a1c8620cc0 | |||
39a7fc04fb | |||
a8b5fb5c1e | |||
18e22b24ea | |||
b53a3ed3f7 | |||
112787b3aa | |||
4f46ff7ee6 | |||
845de093ba | |||
65e83ed885 | |||
b98d69b33e | |||
d159b98c3c | |||
1ef5c3980d | |||
ffc569e275 | |||
0e28af9eb1 |
@ -9,6 +9,13 @@
|
||||
|
||||
# abra x.x.x (UNRELEASED)
|
||||
|
||||
# abra 0.7.4 (2021-05-10)
|
||||
|
||||
- Sort `apps.json` when publishing ([39a7fc0](https://git.autonomic.zone/coop-cloud/abra/commit/39a7fc04fb5df1a6d78b84f51838530ab3eb76db))
|
||||
- Fix publishing of rating for new apps ([0e28af9](https://git.autonomic.zone/coop-cloud/abra/commit/0e28af9eb1af6c6da705b4614ddd173c60576629))
|
||||
- Detect compose filenames in `n+1` release generation ([ffc569e](https://git.autonomic.zone/coop-cloud/abra/commit/ffc569e275df7ca784a4db1a3331e17975fd8c87))
|
||||
- Fix secret generation when specifying length ([3a353f4](https://git.autonomic.zone/coop-cloud/abra/commit/3a353f4062baccde2c9f175b03afb2db6d462ae4))
|
||||
|
||||
# abra 0.7.3 (2021-04-28)
|
||||
|
||||
- Only check for pw(q)gen if we're actually trying to use them ([#147](https://git.autonomic.zone/coop-cloud/abra/issues/147))
|
||||
|
26
abra
26
abra
@ -3,7 +3,7 @@
|
||||
GIT_URL="https://git.autonomic.zone/coop-cloud/"
|
||||
ABRA_APPS_URL="https://apps.coopcloud.tech"
|
||||
ABRA_DIR="${ABRA_DIR:-$HOME/.abra}"
|
||||
ABRA_VERSION="0.7.3"
|
||||
ABRA_VERSION="0.7.4"
|
||||
ABRA_BACKUP_DIR="${ABRA_BACKUP_DIR:-$ABRA_DIR/backups}"
|
||||
ABRA_VENDOR_DIR="$ABRA_DIR/vendor"
|
||||
ABRA_APPS_JSON="${ABRA_DIR}/apps.json"
|
||||
@ -808,17 +808,17 @@ ensure_stack_deployed() {
|
||||
}
|
||||
|
||||
ensure_domain_deployed() {
|
||||
DOMAIN=$1
|
||||
local domain=$1
|
||||
|
||||
warning "Waiting for $DOMAIN to come up..."
|
||||
warning "Waiting for $domain to come up..."
|
||||
|
||||
idx=1
|
||||
until curl --output /dev/null --silent --head --fail "$DOMAIN"; do
|
||||
debug "Polled $DOMAIN $idx time(s) already"
|
||||
until curl --output /dev/null --silent --head --fail "$domain"; do
|
||||
debug "Polled $domain $idx time(s) already"
|
||||
sleep 3
|
||||
idx=$(("$idx" + 1))
|
||||
if [[ $idx -gt 10 ]]; then
|
||||
error "$DOMAIN still isn't up, check status by running \"abra app ${STACK_NAME} ps\""
|
||||
error "$domain still isn't up, check status by running \"abra app ${STACK_NAME} ps\""
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -899,7 +899,7 @@ prompt_confirm() {
|
||||
return
|
||||
fi
|
||||
|
||||
read -rp "Continue? (y/[n])? " choice
|
||||
read -rp "Continue? [y/N]? " choice
|
||||
|
||||
case "$choice" in
|
||||
y|Y ) return ;;
|
||||
@ -1649,7 +1649,7 @@ sub_app_secret_generate(){
|
||||
if [[ -n "$LENGTH" ]]; then
|
||||
if [ -z "$abra__cmd_" ]; then
|
||||
require_binary pwgen
|
||||
abra__cmd_="pwgen -s \"$LENGTH\" 1"
|
||||
abra__cmd_="pwgen -s $LENGTH 1"
|
||||
fi
|
||||
else
|
||||
if [ -z "$abra__cmd_" ]; then
|
||||
@ -1881,6 +1881,7 @@ Create a new application recipe called <recipe>."
|
||||
|
||||
sub_recipe_create() {
|
||||
recipe="$abra__recipe_"
|
||||
recipe_kebab="${recipe//-/_}"
|
||||
|
||||
recipe_dir="$ABRA_DIR/apps/$recipe"
|
||||
|
||||
@ -1894,7 +1895,11 @@ sub_recipe_create() {
|
||||
|
||||
cd "$recipe_dir" || error "Failed to create directory '$recipe_dir'"
|
||||
|
||||
rm -rf .git .gitea
|
||||
rm -rf .git .gitea .drone.yml
|
||||
|
||||
sed -i "s/\${REPO_NAME}/$recipe/g" README.md
|
||||
sed -i "s/\${REPO_NAME_TITLE}/$recipe/g" README.md
|
||||
sed -i "s/\${REPO_NAME_KEBAB}/$recipe_kebab/g" .env.sample
|
||||
|
||||
success "New recipe created in '$recipe_dir', happy hacking! 👌"
|
||||
}
|
||||
@ -2019,8 +2024,7 @@ sub_recipe_release() {
|
||||
|
||||
for compose_file in "${compose_files[@]}"; do
|
||||
mapfile -t services < <($YQ e -N '.services | keys | .[]' "$compose_file" | sort -u)
|
||||
|
||||
if ! printf '%s\0' "${services[@]}" | grep -Fqxz -- "app"; then
|
||||
if [ "$compose_file" = "compose.yml" ] && ! printf '%s\0' "${services[@]}" | grep -Fqxz -- "app"; then
|
||||
# shellcheck disable=SC2016
|
||||
warning 'No `app` service found; which one should we use for the version number?'
|
||||
select service_item in "${services[@]##*/}"; do
|
||||
|
@ -25,15 +25,21 @@ SCRIPT_PATH = Path(__file__).absolute().parent
|
||||
REPOS_TO_SKIP = (
|
||||
"abra",
|
||||
"abra-apps",
|
||||
"abra-gandi",
|
||||
"abra-hetzner",
|
||||
"backup-bot",
|
||||
"cloud.autonomic.zone",
|
||||
"docs.cloud.autonomic.zone",
|
||||
"coopcloud.tech",
|
||||
"coturn",
|
||||
"docker-cp-deploy",
|
||||
"docker-dind-bats-kcov",
|
||||
"docs.coopcloud.tech",
|
||||
"example",
|
||||
"gardening",
|
||||
"organising",
|
||||
"pyabra",
|
||||
"stack-ssh-deploy",
|
||||
"radicle-seed-node",
|
||||
"coturn",
|
||||
"stack-ssh-deploy",
|
||||
"swarm-cronjob",
|
||||
)
|
||||
|
||||
log = getLogger(__name__)
|
||||
@ -101,7 +107,6 @@ def clone_all_apps(repos_json):
|
||||
repos = [[p["name"], p["ssh_url"]] for p in repos_json]
|
||||
|
||||
for name, url in repos:
|
||||
continue
|
||||
if name in REPOS_TO_SKIP:
|
||||
continue
|
||||
|
||||
@ -145,11 +150,6 @@ def generate_apps_json(repos_json):
|
||||
"default_branch": repo_details.get("default_branch", ""),
|
||||
"description": repo_details.get("description", ""),
|
||||
"website": repo_details.get("website", ""),
|
||||
# Note(decentral1se): please note that the app metadata do not
|
||||
# correspond to version tags. We simply parse the latest metadata
|
||||
# list from HEAD. This may lead to unexpected situations where
|
||||
# users believe X feature is available under Y version but it is
|
||||
# not.
|
||||
"features": metadata,
|
||||
"versions": get_app_versions(app_path, cached_apps_json),
|
||||
"icon": repo_details.get("avatar_url", ""),
|
||||
@ -164,9 +164,13 @@ def get_app_metadata(app_path):
|
||||
|
||||
chdir(app_path)
|
||||
|
||||
with open(f"{app_path}/README.md", "r") as handle:
|
||||
log.info(f"{app_path}/README.md")
|
||||
contents = handle.read()
|
||||
try:
|
||||
with open(f"{app_path}/README.md", "r") as handle:
|
||||
log.info(f"{app_path}/README.md")
|
||||
contents = handle.read()
|
||||
except Exception:
|
||||
log.info(f"No {app_path}/README.md discovered, moving on")
|
||||
return {}
|
||||
|
||||
try:
|
||||
for match in findall(r"\*\*.*\s\*", contents):
|
||||
@ -179,6 +183,10 @@ def get_app_metadata(app_path):
|
||||
"rating": match.split(",")[1].strip(),
|
||||
"source": match.split(",")[-1].replace("*", "").strip(),
|
||||
}
|
||||
elif title == "status":
|
||||
value = {"❶💚": 1, "❷💛": 2, "❸🍎": 3, "❹💣": 4, "?": 5, "": 5}[
|
||||
match.split(":")[-1].replace("*", "").strip()
|
||||
]
|
||||
else:
|
||||
value = match.split(":")[-1].replace("*", "").strip()
|
||||
|
||||
@ -276,7 +284,13 @@ def main():
|
||||
|
||||
target = f"{SCRIPT_PATH}/../deploy/apps.coopcloud.tech/apps.json"
|
||||
with open(target, "w", encoding="utf-8") as handle:
|
||||
dump(generate_apps_json(repos_json), handle, ensure_ascii=False, indent=4)
|
||||
dump(
|
||||
generate_apps_json(repos_json),
|
||||
handle,
|
||||
ensure_ascii=False,
|
||||
indent=4,
|
||||
sort_keys=True,
|
||||
)
|
||||
|
||||
log.info(f"Successfully generated {target}")
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
ABRA_VERSION="0.7.3"
|
||||
ABRA_VERSION="0.7.4"
|
||||
GIT_URL="https://git.autonomic.zone/coop-cloud/abra"
|
||||
ABRA_SRC="$GIT_URL/raw/tag/$ABRA_VERSION/abra"
|
||||
ABRA_DIR="${ABRA_DIR:-$HOME/.abra/}"
|
||||
|
Reference in New Issue
Block a user