Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit bd418ca

Browse files
committed
projects: Update AppVeyor to use secure github API access to prevent usage limits.
1 parent 222b5b9 commit bd418ca

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

SMP/appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ configuration: Release+ReleaseDLLStaticDeps
1111
platform: x86+x64
1212

1313
environment:
14+
GITHUBTOKEN:
15+
secure: aiTcAD/YitqgwuiBdC3ImXiUlHfIIDD7ayjCs3Y3aAO5vEm1gA7flCZpUZ60a5am
1416
matrix:
1517
- MSVC_VER: 12
1618
- MSVC_VER: 14

SMP/project_get_dependencies.bat

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,12 @@ SET REPONAME=%~1
9797
REM Get latest release
9898
ECHO %REPONAME%: Getting latest release...
9999
SET UPSTREAMAPIURL=%UPSTREAMURL:github.com=api.github.com/repos%
100-
powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest > latest.json } catch {exit 1}"
100+
REM Check if secure OAuth is available
101+
IF "%GITHUBTOKEN%" == "" (
102+
powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest > latest.json } catch {exit 1}"
103+
) ELSE (
104+
powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest -Headers @{'Authorization' = 'token %GITHUBTOKEN%'} > latest.json } catch {exit 1}"
105+
)
101106
IF NOT %ERRORLEVEL% == 0 ( ECHO Failed getting latest %REPONAME% release & EXIT /B 1 )
102107
REM Get tag for latest release
103108
FOR /F "tokens=* USEBACKQ" %%F IN (`TYPE latest.json ^| FINDSTR /B "tag_name"`) DO SET TAG=%%F

0 commit comments

Comments
 (0)