website/scripts/docsmg: Bug fixes (#10668)
* add docsmg tool * moved to the correct scripts directory * removed test files * added install script and readme draft to docsmg * fix install script * fixed issues * Revert "fixed issues" This reverts commita51192025f. * Revert "Revert "fixed issues"" This reverts commitab68918fea. * added dotenv and updated readme * fixed install script
This commit is contained in:
		| @ -19,3 +19,17 @@ pub fn read_migrate_file(file: PathBuf) -> anyhow::Result<Vec<(PathBuf, PathBuf) | ||||
|         .collect::<Vec<_>>(); | ||||
|     Ok(migrations) | ||||
| } | ||||
|  | ||||
| pub fn read_migrate_file_left_side(file: PathBuf) -> anyhow::Result<Vec<PathBuf>> { | ||||
|     let contents = read_to_string(file)?; | ||||
|     let lines: Vec<String> = contents | ||||
|         .split('\n') | ||||
|         .map(|x| x.to_owned()) | ||||
|         .filter(|x| x != "") | ||||
|         .collect(); | ||||
|     let migrations = lines | ||||
|         .iter() | ||||
|         .map(|x| x.split(" -> ").collect::<Vec<&str>>()[0].into()) | ||||
|         .collect::<Vec<_>>(); | ||||
|     Ok(migrations) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Bama
					Bama