Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit ba74f7e

Browse files
committed
fixed #561
1 parent f5a57ce commit ba74f7e

File tree

3 files changed

+80
-1
lines changed

3 files changed

+80
-1
lines changed

+xolotl/version.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
function version()
2-
disp('v21.3.17');
2+
disp('v21.3.18');

@xolotl/upload.m

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
2+
% _ _ _
3+
% __ _____ | | ___ | |_| |
4+
% \ \/ / _ \| |/ _ \| __| |
5+
% > < (_) | | (_) | |_| |
6+
% /_/\_\___/|_|\___/ \__|_|
7+
%
8+
% ### upload
9+
%
10+
%
11+
% **Syntax**
12+
%
13+
% ```matlab
14+
% x.upload;
15+
% ```
16+
%
17+
% **Description**
18+
%
19+
% Uploads a compiled binary to Github so that
20+
% others can use it. For this to work, you will
21+
% need:
22+
%
23+
% 1. write permissions to github.com/sg-s/xolotl
24+
% 2. The github CLI (gh) installed and configured
25+
%
26+
% This method will fail silently without any
27+
% log, and is not meant for public use.
28+
%
29+
30+
31+
function upload(self)
32+
33+
34+
binary_loc = fullfile(filelib.cachePath('xolotl'),['X_' self.hash '.' mexext]);
35+
36+
try
37+
38+
self.integrate;
39+
40+
[e,o] = system(['/usr/local/bin/gh release upload bin ' binary_loc ' --repo sg-s/xolotl']);
41+
42+
if any(strfind(o,'Successfully uploaded'))
43+
disp(['Uploaded binary with hash: ' self.hash])
44+
end
45+
46+
if any(strfind(o,'asset under the same name already exists'))
47+
disp('This binary already exists on Github')
48+
end
49+
50+
catch
51+
52+
end

docs/reference/matlab/xolotl.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1389,6 +1389,33 @@ installed version with the latest version.
13891389

13901390

13911391

1392+
-------
1393+
1394+
### upload
1395+
1396+
1397+
**Syntax**
1398+
1399+
```matlab
1400+
x.upload;
1401+
```
1402+
1403+
**Description**
1404+
1405+
Uploads a compiled binary to Github so that
1406+
others can use it. For this to work, you will
1407+
need:
1408+
1409+
1. write permissions to github.com/sg-s/xolotl
1410+
2. The github CLI (gh) installed and configured
1411+
1412+
This method will fail silently without any
1413+
log, and is not meant for public use.
1414+
1415+
1416+
1417+
1418+
13921419
-------
13931420

13941421
### viewCode

0 commit comments

Comments
 (0)