flake source url change in shellscripts

This commit is contained in:
m3tam3re 2025-04-22 08:44:10 +02:00
parent 8b975e7d54
commit 8af3e1a3d3
5 changed files with 12 additions and 17 deletions

13
flake.lock generated
View File

@ -12,12 +12,12 @@
"rev": "45622da8ac40d404e59fa1eff9f63e42b7b95e2b",
"revCount": 10,
"type": "git",
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
"url": "https://code.m3ta.dev/m3tam3re/self-host-playbook-base"
},
"original": {
"ref": "stable",
"type": "git",
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
"url": "https://code.m3ta.dev/m3tam3re/self-host-playbook-base"
}
},
"deploy-rs": {
@ -42,9 +42,7 @@
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": ["nixpkgs"]
},
"locked": {
"lastModified": 1744145203,
@ -129,10 +127,7 @@
"base-config": "base-config",
"deploy-rs": "deploy-rs",
"disko": "disko",
"nixpkgs": [
"base-config",
"nixpkgs"
]
"nixpkgs": ["base-config", "nixpkgs"]
}
},
"systems": {

View File

@ -4,7 +4,7 @@
inputs = {
base-config = {
# url = "path:/home/m3tam3re/p/nix/self-host-playbook-base";
url = "git+https://code.m3tam3re.com/m3tam3re/self-host-playbook-base?ref=stable";
url = "git+https://code.m3ta.dev/m3tam3re/self-host-playbook-base?ref=stable";
};
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-24.11";

View File

@ -50,7 +50,7 @@ fi
get_latest_version() {
local LATEST_VERSION
latest_version=$(curl -s "https://code.m3tam3re.com/api/v1/repos/m3tam3re/self-host-playbook/tags" | jq -r '.[] | select(.name | startswith("v")) | .name' | sort -V | tail -n1)
latest_version=$(curl -s "https://code.m3ta.dev/api/v1/repos/m3tam3re/self-host-playbook/tags" | jq -r '.[] | select(.name | startswith("v")) | .name' | sort -V | tail -n1)
if [ -z "$latest_version" ]; then
echo "❌ Error: Could not fetch latest version from repository"
@ -83,7 +83,7 @@ setup_latest_version() {
mkdir -p "$CLONE_DIR"
# Clone to temporary directory with --quiet flag
if ! nix flake clone --quiet "git+https://code.m3tam3re.com/m3tam3re/self-host-playbook?ref=v${target_version}" --dest "$CLONE_DIR" 2>/dev/null; then
if ! nix flake clone --quiet "git+https://code.m3ta.dev/m3tam3re/self-host-playbook?ref=v${target_version}" --dest "$CLONE_DIR" 2>/dev/null; then
echo "❌ Failed to clone repository"
return 1
fi

View File

@ -28,7 +28,7 @@ get_current_version() {
get_latest_version() {
local latest_version
latest_version=$(curl -s "https://code.m3tam3re.com/api/v1/repos/m3tam3re/self-host-playbook/tags" | jq -r '.[] | select(.name | startswith("v")) | .name' | sort -V | tail -n1)
latest_version=$(curl -s "https://code.m3ta.dev/api/v1/repos/m3tam3re/self-host-playbook/tags" | jq -r '.[] | select(.name | startswith("v")) | .name' | sort -V | tail -n1)
if [ -z "$latest_version" ]; then
echo "❌ Error: Could not fetch latest version from repository"
@ -51,7 +51,7 @@ check_compatibility() {
fi
local min_compatible_version
min_compatible_version=$(curl -s "https://code.m3tam3re.com/m3tam3re/self-host-playbook/raw/branch/develop/v${target_version}/$version_file" | jq -r '.minCompatibleVersion')
min_compatible_version=$(curl -s "https://code.m3ta.dev/m3tam3re/self-host-playbook/raw/branch/develop/v${target_version}/$version_file" | jq -r '.minCompatibleVersion')
if version_lt "$current_version" "$min_compatible_version"; then
echo "❌ Your current version ($current_version) is too old for direct upgrade."
@ -71,7 +71,7 @@ show_changelog() {
echo "------------------------------------------------"
local changelog
changelog=$(curl -s "https://code.m3tam3re.com/m3tam3re/self-host-playbook/raw/branch/develop/v${target_version}/$version_file" | jq -r '.changelog')
changelog=$(curl -s "https://code.m3ta.dev/m3tam3re/self-host-playbook/raw/branch/develop/v${target_version}/$version_file" | jq -r '.changelog')
# Process each version once, then all its changes
echo "$changelog" | jq -r --arg cv "$current_version" --arg tv "$target_version" '
@ -103,7 +103,7 @@ perform_update() {
mkdir -p "$CLONE_DIR"
# Clone to temporary directory with --quiet flag
if ! nix flake clone --quiet "git+https://code.m3tam3re.com/m3tam3re/self-host-playbook?ref=v${target_version}" --dest "$CLONE_DIR" 2>/dev/null; then
if ! nix flake clone --quiet "git+https://code.m3ta.dev/m3tam3re/self-host-playbook?ref=v${target_version}" --dest "$CLONE_DIR" 2>/dev/null; then
echo "❌ Failed to clone repository"
return 1
fi

View File

@ -1,7 +1,7 @@
{
"version": "0.1.0",
"minCompatibleVersion": "0.0.0",
"updateUrl": "https://code.m3tam3re.com/m3tam3re/self-host-playbook",
"updateUrl": "https://code.m3ta.dev/m3tam3re/self-host-playbook",
"changelog": {
"0.1.0": [
"Added a management CLI for easily adding custom services.",