Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
function increaseVersion(bumpType)
% increaseVersion
function increaseModelVersion(bumpType)
% increaseModelVersion
%
% Increase version for GEM respositories
%
% Usage: function increaseVersion(bumpType)
% Usage: function increaseModelVersion(bumpType)
%
% Benjam�n J. S�nchez, 2018-07
% Hao Wang, 2018-09-22
% Hao Wang, 2018-11-11
%

%Check if in master:
Expand All @@ -15,8 +15,13 @@ function increaseVersion(bumpType)
error('ERROR: not in master')
end

%Get model path
[ST, I]=dbstack('-completenames');
modelPath=fileparts(fileparts(fileparts(ST(I).file)));

%Bump version number:
fid = fopen('../../version.txt','r');
versionFile=fullfile(modelPath,'version.txt');
fid = fopen(versionFile,'r');
oldVersion = fscanf(fid, '%s');
fclose(fid);
oldVersion = str2double(strsplit(oldVersion,'.'));
Expand Down Expand Up @@ -47,18 +52,19 @@ function increaseVersion(bumpType)

%Load model:
%ihuman = importModel('../../ModelFiles/xml/humanGEM.xml');
load('../../ModelFiles/mat/humanGEM.mat');
matFile=fullfile(modelPath,'ModelFiles','mat','humanGEM.mat');
load(matFile);

%Include tag and save model:
ihuman.version = newVersion;

%Store model as .mat:
save('../../ModelFiles/mat/humanGEM.mat','ihuman');
save(matFile,'ihuman');
%deal with other formats later
%exportForGit(ihuman,'humanGEM','..',{'mat', 'txt', 'xlsx', 'xml', 'yml'});

%Update version file:
fid = fopen('../../version.txt','wt');
fid = fopen(versionFile,'wt');
fprintf(fid,newVersion);
fclose(fid);

Expand Down
Binary file modified ModelFiles/mat/humanGEM.mat
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Human genome-scale metabolic models (GEMs) are important tools for the study of

- Pubmed ID: n/a

- Last update: 2018-10-28
- Last update: 2018-11-11


- The model contains:
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.2
0.6.0