tangled
alpha
login
or
join now
evan.jarrett.net
/
at-container-registry
66
fork
atom
A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
atcr.io
docker
container
atproto
go
66
fork
atom
overview
issues
1
pulls
pipelines
update install scripts
evan.jarrett.net
5 months ago
ef0d830d
386dcb92
verified
This commit was signed with the committer's
known signature
.
evan.jarrett.net
SSH Key Fingerprint:
SHA256:bznk0uVPp7XFOl67P0uTM1pCjf2A4ojeP/lsUE7uauQ=
+20
-35
3 changed files
expand all
collapse all
unified
split
pkg
appview
static
install.ps1
install.sh
scripts
publish-artifact.sh
+9
-16
pkg/appview/static/install.ps1
···
4
4
$ErrorActionPreference = "Stop"
5
5
6
6
# Configuration
7
7
-
$Repo = "atcr-io/atcr"
8
7
$BinaryName = "docker-credential-atcr.exe"
9
8
$InstallDir = if ($env:ATCR_INSTALL_DIR) { $env:ATCR_INSTALL_DIR } else { "$env:ProgramFiles\ATCR" }
9
9
+
$Version = "v0.0.1"
10
10
+
$TagHash = "c6cfbaf1723123907f9d23e300f6f72081e65006"
11
11
+
$TangledRepo = "https://tangled.org/@evan.jarrett.net/at-container-registry"
10
12
11
13
Write-Host "ATCR Credential Helper Installer for Windows" -ForegroundColor Green
12
14
Write-Host ""
···
27
29
$Arch = Get-Architecture
28
30
Write-Host "Detected: Windows $Arch" -ForegroundColor Green
29
31
30
30
-
# Get latest release version
31
31
-
function Get-LatestVersion {
32
32
-
Write-Host "Fetching latest version..." -ForegroundColor Yellow
33
33
-
$releaseUrl = "https://api.github.com/repos/$Repo/releases/latest"
34
32
35
35
-
try {
36
36
-
$release = Invoke-RestMethod -Uri $releaseUrl -UseBasicParsing
37
37
-
return $release.tag_name
38
38
-
} catch {
39
39
-
Write-Host "Failed to fetch latest version: $_" -ForegroundColor Red
40
40
-
exit 1
41
41
-
}
33
33
+
if ($env:ATCR_VERSION) {
34
34
+
$Version = $env:ATCR_VERSION
35
35
+
Write-Host "Using specified version: $Version" -ForegroundColor Yellow
36
36
+
} else {
37
37
+
Write-Host "Using version: $Version" -ForegroundColor Green
42
38
}
43
43
-
44
44
-
$Version = if ($env:ATCR_VERSION) { $env:ATCR_VERSION } else { Get-LatestVersion }
45
45
-
Write-Host "Latest version: $Version" -ForegroundColor Green
46
39
47
40
# Download and install binary
48
41
function Install-Binary {
···
53
46
54
47
$versionClean = $Version.TrimStart('v')
55
48
$fileName = "docker-credential-atcr_${versionClean}_Windows_${Arch}.zip"
56
56
-
$downloadUrl = "https://github.com/$Repo/releases/download/$Version/$fileName"
49
49
+
$downloadUrl = "$TangledRepo/tags/$TagHash/download/$fileName"
57
50
58
51
Write-Host "Downloading from: $downloadUrl" -ForegroundColor Yellow
59
52
+8
-18
pkg/appview/static/install.sh
···
11
11
NC='\033[0m' # No Color
12
12
13
13
# Configuration
14
14
-
REPO="atcr-io/atcr"
15
14
BINARY_NAME="docker-credential-atcr"
16
15
INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"
16
16
+
VERSION="v0.0.1"
17
17
+
TAG_HASH="c6cfbaf1723123907f9d23e300f6f72081e65006"
18
18
+
TANGLED_REPO="https://tangled.org/@evan.jarrett.net/at-container-registry"
17
19
18
20
# Detect OS and architecture
19
21
detect_platform() {
···
47
49
esac
48
50
}
49
51
50
50
-
# Get latest release version
51
51
-
get_latest_version() {
52
52
-
echo -e "${YELLOW}Fetching latest version...${NC}"
53
53
-
LATEST_VERSION=$(curl -fsSL "https://api.github.com/repos/${REPO}/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
54
54
-
55
55
-
if [ -z "$LATEST_VERSION" ]; then
56
56
-
echo -e "${RED}Failed to fetch latest version${NC}"
57
57
-
exit 1
58
58
-
fi
59
59
-
60
60
-
echo -e "${GREEN}Latest version: ${LATEST_VERSION}${NC}"
61
61
-
}
62
52
63
53
# Download and install binary
64
54
install_binary() {
65
65
-
local version="${1:-$LATEST_VERSION}"
66
66
-
local download_url="https://github.com/${REPO}/releases/download/${version}/docker-credential-atcr_${version#v}_${OS}_${ARCH}.tar.gz"
55
55
+
local version="${1:-$VERSION}"
56
56
+
local download_url="${TANGLED_REPO}/tags/${TAG_HASH}/download/docker-credential-atcr_${version#v}_${OS}_${ARCH}.tar.gz"
67
57
68
58
echo -e "${YELLOW}Downloading from: ${download_url}${NC}"
69
59
···
135
125
136
126
# Allow specifying version via environment variable
137
127
if [ -z "$ATCR_VERSION" ]; then
138
138
-
get_latest_version
128
128
+
echo -e "Using version: ${GREEN}${VERSION}${NC}"
139
129
else
140
140
-
LATEST_VERSION="$ATCR_VERSION"
141
141
-
echo -e "Using specified version: ${GREEN}${LATEST_VERSION}${NC}"
130
130
+
VERSION="$ATCR_VERSION"
131
131
+
echo -e "Using specified version: ${GREEN}${VERSION}${NC}"
142
132
fi
143
133
144
134
install_binary
+3
-1
scripts/publish-artifact.sh
···
15
15
}') &&
16
16
echo "$ARTIFACT_JSON" > temp_artifact.json &&
17
17
cat temp_artifact.json &&
18
18
-
goat record create temp_artifact.json -n
18
18
+
goat record create temp_artifact.json -n
19
19
+
rm temp_artifact.json
20
20
+
sleep 2