forked from MapComplete/MapComplete
		
	Fix of init scripts
This commit is contained in:
		
							parent
							
								
									f0c9fc20fe
								
							
						
					
					
						commit
						a1ca76dc48
					
				
					 1 changed files with 24 additions and 13 deletions
				
			
		|  | @ -136,6 +136,28 @@ function generateTagInfoEntry(layout: LayoutConfig): any { | |||
|     return filename | ||||
| } | ||||
| 
 | ||||
| // Write the URLS to the taginfo repository. Might fail if the repository is not checked ou
 | ||||
| function generateProjectsOverview() { | ||||
|     try { | ||||
|         const tagInfoList = "../taginfo-projects/project_list.txt" | ||||
|         let projectList = readFileSync(tagInfoList, "UTF8") | ||||
|             .split("\n") | ||||
|             .filter(entry => entry.indexOf("mapcomplete_") < 0) | ||||
|             .concat(files.map(f => `${f} https://raw.githubusercontent.com/pietervdvn/MapComplete/master/Docs/TagInfo/${f}.json`)) | ||||
|             .sort() | ||||
|             .filter(entry => entry != "") | ||||
| 
 | ||||
|         console.log("Writing taginfo project filelist"); | ||||
|         writeFileSync(tagInfoList, projectList.join("\n") + "\n"); | ||||
| 
 | ||||
| 
 | ||||
|     } catch (e) { | ||||
|         console.warn("Could not write the taginfo-projects list - the repository is probably not checked out. Are you creating a fork? Ignore this message then.") | ||||
|     } | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| console.log("Creating taginfo project files") | ||||
| 
 | ||||
|  | @ -150,15 +172,4 @@ for (const layout of AllKnownLayouts.layoutsList) { | |||
|     } | ||||
|     files.push(generateTagInfoEntry(layout)); | ||||
| } | ||||
| 
 | ||||
| const tagInfoList = "../taginfo-projects/project_list.txt" | ||||
| let projectList = readFileSync(tagInfoList, "UTF8") | ||||
|     .split("\n") | ||||
|     .filter(entry => entry.indexOf("mapcomplete_") < 0) | ||||
|     .concat(files.map(f => `${f} https://raw.githubusercontent.com/pietervdvn/MapComplete/master/Docs/TagInfo/${f}.json`)) | ||||
|     .sort() | ||||
|     .filter(entry => entry != "") | ||||
| 
 | ||||
| console.log("Writing taginfo project filelist"); | ||||
| writeFileSync(tagInfoList, projectList.join("\n") + "\n"); | ||||
|      | ||||
| generateProjectsOverview(); | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue