Skip to content

Commit

Permalink
Look for jar files, not zip files when self-installing.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Sep 15, 2021
1 parent a52dfce commit f5be2be
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/lein
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function self_install {
fi
msg "Downloading Leiningen to $LEIN_JAR now..."
mkdir -p "$(dirname "$LEIN_JAR")"
LEIN_URL="https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.zip"
LEIN_URL="https://github.com/technomancy/leiningen/releases/download/$LEIN_VERSION/leiningen-$LEIN_VERSION-standalone.jar"
$HTTP_CLIENT "$LEIN_JAR.pending" "$LEIN_URL"
local exit_code=$?
if [ $exit_code == 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/lein.bat
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ if not exist %LEIN_INSTALL_DIR% mkdir %LEIN_INSTALL_DIR%

echo Downloading Leiningen now...

set LEIN_JAR_URL=https://github.com/technomancy/leiningen/releases/download/%LEIN_VERSION%/leiningen-%LEIN_VERSION%-standalone.zip
set LEIN_JAR_URL=https://github.com/technomancy/leiningen/releases/download/%LEIN_VERSION%/leiningen-%LEIN_VERSION%-standalone.jar
call :DownloadFile "%LEIN_JAR%.pending" "%LEIN_JAR_URL%"
SET RC=%ERRORLEVEL%
if not %RC% == 0 goto DOWNLOAD_FAILED
Expand Down
2 changes: 1 addition & 1 deletion bin/lein.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function Install-Self
$jardir = ([IO.FileInfo]$env:LEIN_JAR).Directory.FullName
if(!(Test-Path $jardir -PathType Container)) {mkdir $jardir |Out-Null}
@{ # splatting Invoke-WebRequest due to long URI
Uri = "https://github.com/technomancy/leiningen/releases/download/$env:LEIN_VERSION/leiningen-$env:LEIN_VERSION-standalone.zip"
Uri = "https://github.com/technomancy/leiningen/releases/download/$env:LEIN_VERSION/leiningen-$env:LEIN_VERSION-standalone.jar"
OutFile = $env:LEIN_JAR
} |% {Write-Progress 'Install-Self' $_.Uri -CurrentOperation "Downloading to $env:LEIN_JAR" ; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest @_}
Write-Progress 'Install-Self' -Completed
Expand Down
3 changes: 1 addition & 2 deletions bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ git commit -a -m "Release $RELEASE_VERSION"
git tag -s $RELEASE_VERSION -m "Release $RELEASE_VERSION"
git push && git push --tags && git push origin master:stable

echo "Upload $SELF_INSTALL_JAR and $SELF_INSTALL_JAR.asc to GitHub"
echo "but rename the jar to .zip first to work around GitHub foolishness."
echo "Upload $SELF_INSTALL_JAR and $SELF_INSTALL_JAR.asc to GitHub."
echo "https://github.com/technomancy/leiningen/releases/tag/$RELEASE_VERSION"
echo "Copy this version's section of NEWS.md to the GitHub release description."

Expand Down

0 comments on commit f5be2be

Please sign in to comment.