Skip to content

Commit

Permalink
Repoint releases to Azure Storage (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
frasdav committed Apr 10, 2024
1 parent e9e2ad6 commit 92bc956
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/delete-prereleases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Delete pre-releases

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: dev-drprasad/delete-older-releases@v0.3.2
with:
delete_prerelease_only: true
delete_tags: true
keep_latest: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Sheriff Azure DevOps Extension Changelog

## 0.0.5

* `InstallSheriffCLI` task updated to download Sheriff from Azure Storage.

## 0.0.4

* `InstallSheriffCLI` task updated to bug fix HTTP 404 when running on Windows agents.
Expand Down
4 changes: 2 additions & 2 deletions tasks/InstallSheriffCLI/InstallSheriffCLIV0/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tasks/InstallSheriffCLI/InstallSheriffCLIV0/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "install-sheriff-cli-task",
"version": "0.0.2",
"version": "0.0.3",
"description": "",
"scripts": {
"test": "run-p test:*",
Expand Down
6 changes: 4 additions & 2 deletions tasks/InstallSheriffCLI/InstallSheriffCLIV0/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const { promisify } = require('util');

const finished = promisify(stream.finished);

const sas = 'sp=r&st=2024-01-01T00:00:00Z&se=2049-12-31T23:59:59Z&spr=https&sv=2022-11-02&sr=c&sig=Obnq5FJma2NJlE1k0PykIYlHbBcTA1yeba3YRLV6rmw%3D';

async function run() {
try {
const version = tl.getInput('version', true);
Expand Down Expand Up @@ -41,9 +43,9 @@ async function run() {

let downloadUrl;
if (version === 'latest') {
downloadUrl = `https://github.com/gofrontier-com/sheriff/releases/latest/download/sheriff_${os}_${platform}.${fileExtension}`;
downloadUrl = `https://sa0she0prd0uks0releases.blob.core.windows.net/sheriff/latest/sheriff_${os}_${platform}.${fileExtension}?${sas}`;
} else {
downloadUrl = `https://github.com/gofrontier-com/sheriff/releases/download/${version}/sheriff_${os}_${platform}.${fileExtension}`;
downloadUrl = `https://sa0she0prd0uks0releases.blob.core.windows.net/sheriff/${version}/sheriff_${os}_${platform}.${fileExtension}?${sas}`;
}
const downloadPath = path.join(agentTempDirectory, `sheriff_${os}_${platform}.${fileExtension}`);
const toolDirPath = `${agentToolsDirectory}/sheriff/${version}/${platform}`;
Expand Down

0 comments on commit 92bc956

Please sign in to comment.