Skip to content

Commit

Permalink
Add DUB version scraping scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
0xEAB committed Jul 27, 2024
1 parent c7b9b0a commit 4503d29
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tools/determine-dub-version-of-dmd-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh
set -e
if [ -z "$1" ]; then
echo "No DMD version provided."
echo "Usage: ${0} <version>"
exit 1
fi

echo "DMD version ${1}"

# Create temporary directory.
tmpDir=$(mktemp -d)

# Download + unpack.
curl -Ssf \
-o "${tmpDir}/dmd.tar.xz" \
"https://download.dlang.org/releases/2.x/${1}/dmd.${1}.linux.tar.xz"
tar -C $tmpDir \
-xf "${tmpDir}/dmd.tar.xz"

# Query DUB for its version.
${tmpDir}/dmd2/linux/bin64/dub --version

# Cleanup.
rm -rf $tmpDir
13 changes: 13 additions & 0 deletions tools/determine-dub-version-of-ldc-release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e
if [ -z "$1" ]; then
echo "No LDC version provided."
echo "Usage: ${0} <version>"
exit 1
fi

echo "v${1} - LDC"

curl -LSsf \
"https://github.com/ldc-developers/ldc/raw/v${1}/packaging/dub_version"
echo ' - DUB'

0 comments on commit 4503d29

Please sign in to comment.