Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tool downloading and output, add Windows MiniForge example #98

Merged
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions .github/workflows/example-5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge-pypy3-4.8.3-2-Linux-x86_64.sh
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.9.0-3/Miniforge-pypy3-4.9.0-3-Linux-x86_64.sh?foo
allow-softlinks: true
show-channel-urls: true
use-only-tar-bz2: true
Expand All @@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@v2
- uses: ./
with:
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.8.3-2/Miniforge-pypy3-4.8.3-2-MacOSX-x86_64.sh
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.9.0-3/Miniforge-pypy3-4.9.0-3-MacOSX-x86_64.sh?foo=bar&baz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?foo=bar&baz Is this related to cache?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nevermind, you used it to test the url parsing.

Right @bollwyvl ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, just want to make sure we've got an out for the inevitable s3 trash or wherever people are putting these things. Actually, going to add some docs about that...

allow-softlinks: true
show-channel-urls: true
use-only-tar-bz2: true
Expand All @@ -49,3 +49,21 @@ jobs:
conda list
conda config --show-sources
conda config --show

example-5-win:
name: Ex5 Windows
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v2
- uses: ./
with:
installer-url: https://github.com/conda-forge/miniforge/releases/download/4.9.0-3/Miniforge3-4.9.0-0-Windows-x86_64.exe?foo=bar&baz#zzz
show-channel-urls: true
use-only-tar-bz2: true
activate-environment: ""
- shell: bash -l {0}
run: |
conda info
conda list
conda config --show-sources
conda config --show
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# CHANGELOG

## [v2.1.0][] (Unreleased)

## Fixes

- [#97][] fixes `installer-url` on Windows
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm good point should have added this to the other PRs :-p

@jaimergp would you like to update this on the changelog with the PRs you started?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, yep, will do!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries I forgot too 🤦🏽


## [v2.0.0][] (2020-11-08)

### Fixes
Expand Down
49 changes: 2 additions & 47 deletions dist/delete/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,51 +420,6 @@ exports.issueCommand = issueCommand;

module.exports = require("child_process");

/***/ }),

/***/ 163:
/***/ (function(__unusedmodule, exports, __webpack_require__) {

"use strict";

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.consoleLog = void 0;
const core = __importStar(__webpack_require__(470));
// General use
//-----------------------------------------------------------------------
/**
* Pretty print section messages
*
* @param args
*/
function consoleLog(...args) {
for (let arg of args) {
core.info("\n# " + arg);
core.info("#".repeat(arg.length + 2) + "\n");
}
}
exports.consoleLog = consoleLog;


/***/ }),

/***/ 251:
Expand Down Expand Up @@ -506,14 +461,13 @@ const os = __importStar(__webpack_require__(87));
const path = __importStar(__webpack_require__(622));
const core = __importStar(__webpack_require__(470));
const io = __importStar(__webpack_require__(1));
const utils = __importStar(__webpack_require__(163));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
let cacheFolder = "~/conda_pkgs_dir";
cacheFolder = cacheFolder.replace("~", os.homedir().replace("\\", "/"));
if (fs.existsSync(cacheFolder) && fs.lstatSync(cacheFolder).isDirectory()) {
utils.consoleLog("Removing uncompressed packages to trim down cache folder...");
core.startGroup("Removing uncompressed packages to trim down cache folder...");
let fullPath;
for (let folder_or_file of fs.readdirSync(cacheFolder)) {
fullPath = path.join(cacheFolder, folder_or_file);
Expand All @@ -531,6 +485,7 @@ function run() {
}
}
}
core.endGroup();
}
}
catch (err) {
Expand Down
Loading