@@ -251,8 +251,7 @@ proc publishPackage(username: string,
251251 branchMasonReg(username, name, safeDir, registryPath);
252252 }
253253
254- const version = addPackageToBricks(packageLocation, safeDir, name,
255- registryPath, isLocal);
254+ const version = addPackageToBricks(packageLocation, safeDir, name, isLocal);
256255 const message =
257256 ' "Adding %s package to registry via mason publish"' .format(version);
258257 var command = [ ' git' , ' commit' , ' -q' , ' -m' , message] ;
@@ -355,9 +354,8 @@ proc cloneMasonReg(username: string,
355354 return ret;
356355 }
357356 else {
358- const gitRegistryPath =
359- ' git clone --quiet ' + registryPath + ' mason-registry' ;
360- var gitCall = gitC(safeDir, gitRegistryPath, false );
357+ const gitClone = ' git clone --quiet %s mason-registry' ;
358+ var gitCall = gitC(safeDir, gitClone.format(registryPath), false );
361359 return gitCall;
362360 }
363361 }
@@ -455,8 +453,7 @@ proc getPackageName() throws {
455453 version.toml with the source url of the package's GitHub repo.
456454 */
457455private proc addPackageToBricks(projectLocal: string , safeDir: string ,
458- name: string , registryPath: string ,
459- isLocal: bool ) throws {
456+ name: string , isLocal: bool ) throws {
460457 const bricksDir = joinPath(safeDir, ' Bricks' );
461458 const projectBrickDir = joinPath(bricksDir, name);
462459 try ! {
@@ -657,7 +654,8 @@ proc check(username: string, path: string, trueIfLocal: bool, ci: bool) throws {
657654 force = true
658655 opt = false
659656 example = false
660- If these are different than what is required to build your package you can disregard this check
657+ If these are different than what is required to build your package
658+ you can disregard this check
661659 " " " .dedent().strip();
662660 writeln (s);
663661 attemptToBuild();
@@ -846,7 +844,8 @@ private proc registryPathCheck(path: string,
846844 */
847845private proc getRemoteOrigin() {
848846 const packageDir = here .cwd();
849- var gitRemoteOrigin = gitC(packageDir, ' git config --get remote.origin.url' , true );
847+ const gitRemoteOrigin =
848+ gitC(packageDir, ' git config --get remote.origin.url' , true );
850849 return gitRemoteOrigin;
851850}
852851
@@ -864,20 +863,21 @@ private proc ensureMasonProject(cwd : string, tomlName="Mason.toml") : string {
864863 return ensureMasonProject(dirname, tomlName);
865864}
866865
867- /* Checks to make sure the package has a main module
866+ /*
867+ Checks to make sure the package has a main module
868868
869869 The source file for the main module should have the same name as the package.
870870 For example, `foo.chpl` is a valid main module for the following package:
871871
872872 foo/
873873 Mason.toml
874874 src/
875- foo.chpl # module foo { include module bar; use bar; proc main() { ... } }
875+ foo.chpl # module foo { include module bar; use bar; proc main() {...} }
876876 foo/
877877 bar.chpl
878878 ...
879879
880- */
880+ */
881881private proc moduleCheck(projectHome : string ) throws {
882882 const files = listDir(projectHome + ' /src' , dirs= false ),
883883 modules = for f in files do if f.endsWith(' .chpl' ) then f;
@@ -901,8 +901,7 @@ proc testCheck(projectHome: string) {
901901 return tests.size > 0 ;
902902 } else return false ;
903903}
904- /* Returns the mason env
905- */
904+ /* Returns the mason env */
906905private proc returnMasonEnv() {
907906 const fakeArgs = [ ' env' ] ;
908907 masonEnv(fakeArgs);
@@ -933,8 +932,10 @@ proc gitTagVersionCheck(projectHome: string) throws {
933932 return (false , allTags, version);
934933}
935934
936- /* make sure directory created is same as that of package
937- name in manifest file */
935+ /*
936+ make sure directory created is same as that of package
937+ name in manifest file
938+ */
938939proc namespaceCollisionCheck(projectHome: string ) throws {
939940 var directoryName = basename(projectHome);
940941 const toParse = open (projectHome + " /Mason.toml" , ioMode.r);
0 commit comments