Mercurial > forge
changeset 12669:1c92b4b26ced octave-forge
releasePKG.m: exclude .hg* files of export as of bug #45669
author | jpicarbajal |
---|---|
date | Fri, 31 Jul 2015 19:49:28 +0000 |
parents | 7623d14dd29c |
children | d68da2f2417b |
files | admin/releasePKG.m |
diffstat | 1 files changed, 15 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/admin/releasePKG.m Tue Jul 28 10:24:59 2015 +0000 +++ b/admin/releasePKG.m Fri Jul 31 19:49:28 2015 +0000 @@ -83,23 +83,23 @@ % Revision control system revsys = parser.Results.revsys; - + if strcmp (revsys,"svn") export_call = ["svn export " fullfile(repo_path,pkgname) " " exported " --force"]; failed = system (export_call); else cdir = pwd (); cd (fullfile (repo_path,pkgname)); - export_call = sprintf ('hg archive %s', exported) + export_call = sprintf ('hg archive --exclude ".hg*" %s', exported) failed = system (export_call); cd (cdir); clear cdir endif - + if failed error ("Can not export.\n"); endif - + if isempty (OFPATH) || !strcmpi(repo_path, OFPATH) setenv('OFPATH',parser.Results.repopath); printf (["\nEnvironment variable OFPATH set to %s\n" ... @@ -125,7 +125,7 @@ exported_tmp = tmpnam (); mv_call = sprintf ("mv -f -T %s %s", tmp, exported_tmp); system (mv_call); - + if !rmdir (exported, "s") error ("Couldn't erase folder"); endif @@ -134,20 +134,20 @@ rmdir (exported_tmp,"s"); clear exported_tmp endif - + % Run bootstrap if found if has_dir ("src", exported) ndir = fullfile (exported,"src"); if has_file ("bootstrap", ndir) odir = pwd (); cd (ndir); - + failed = system ("./bootstrap"); if failed cd (odir); error ("Could run bootstrap.\n"); end - + [success, msg] = rmdir ("autom4te.cache", "s"); if !success error (msg); @@ -155,7 +155,7 @@ cd (odir); endif endif - + % Remove devel, deprecated, .*ignore an others to_erase = {"devel","deprecated",".svnignore",".hgignore",".hg_archival.txt"}; for idir = 1:numel(to_erase) @@ -169,7 +169,7 @@ delete (fullfile (exported, to_erase{idir})); endif endfor - + % Get package version desc_file = textread (fullfile (exported,"DESCRIPTION"),"%s"); [tf ind] = ismember ("Version:",desc_file); @@ -187,7 +187,7 @@ % Remove exported package rmdir (exported, "s"); - + do_doc = input ("\nCreate documentation for Octave-Forge? [y|Yes|Y] / [n|No|N] ","s"); do_doc = strcmpi (do_doc(1),'y'); @@ -258,16 +258,15 @@ endfunction function tf = has_dir (ddir, exported) - + s = dir (exported); tf = any (cellfun (@(x) strcmpi (x,ddir), {s([s.isdir]).name})); - + endfunction function tf = has_file (dfile, ddir) - + s = dir (ddir); tf = any (cellfun (@(x) strcmpi (x,dfile), {s(![s.isdir]).name})); - + endfunction -