Skip to content

Commit

Permalink
setup-resharper v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jozefizso committed Aug 26, 2021
1 parent 22ae238 commit ad1954f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
- name: Setup ReSharper CTL
uses: ./
with:
version: 2020.1
version: 2021.2
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2020 Jozef Izso
Copyright (c) 2020-2021 Jozef Izso
Copyright (c) 2021 Kurt von Laven

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@ steps:
- uses: actions/checkout@master
- uses: goit/setup-resharper@v1
with:
version: '2020.1'
version: '2021.2'
- run: InspectCode <solution file>
```
## Note
Use `goit/setup-resharper@v1` for ReSharper CTL 2020.1 and older releases.

The download address changed and `goit/setup-resharper@v2` supports ReSharper CTL 2020.2 and newer.

## License

The scripts and documentation in this project are released under the [MIT License](LICENSE)
Scripts and documentation in this project are released under the [MIT License](LICENSE)
13 changes: 3 additions & 10 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5466,8 +5466,7 @@ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _argume
};


const IS_WINDOWS = process.platform === 'win32';
const RESHAPER_CTL_CACHE_NAME = 'resharper-ctl';
const RESHAPER_CTL_CACHE_NAME = 'v2-resharper-ctl';
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
Expand All @@ -5476,17 +5475,11 @@ function run() {
console.log('Checking tool cache');
let toolPath = _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__.find(RESHAPER_CTL_CACHE_NAME, version);
if (!toolPath) {
let url = '';
if (IS_WINDOWS) {
url = `https://download.jetbrains.com/resharper/ReSharperUltimate.${version}/JetBrains.ReSharper.CommandLineTools.${version}.zip`;
}
else {
url = `https://download.jetbrains.com/resharper/ReSharperUltimate.${version}/JetBrains.ReSharper.CommandLineTools.Unix.${version}.tar.gz`;
}
let url = `https://download.jetbrains.com/resharper/dotUltimate.${version}/JetBrains.ReSharper.CommandLineTools.${version}.zip`;
console.log('Downloading ReSharper CTL', url);
let downloadPath = yield _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__.downloadTool(url);
console.log('Extracting tools', downloadPath);
let extPath = IS_WINDOWS ? yield _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__.extractZip(downloadPath) : yield _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__.extractTar(downloadPath);
let extPath = yield _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__.extractZip(downloadPath);
console.log('Caching tools');
let cachedDir = yield _actions_tool_cache__WEBPACK_IMPORTED_MODULE_1__.cacheDir(extPath, RESHAPER_CTL_CACHE_NAME, version);
toolPath = cachedDir;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-resharper",
"version": "1.1.0",
"version": "2.0.0",
"private": true,
"description": "Setup ReSharper Command Line Tools in GitHub Action",
"main": "src/setup-resharper.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/setup-resharper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';

const RESHAPER_CTL_CACHE_NAME = 'v1-resharper-ctl';
const RESHAPER_CTL_CACHE_NAME = 'v2-resharper-ctl';

async function run() {
try {
Expand Down

0 comments on commit ad1954f

Please sign in to comment.