Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature handle build issues#15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 3 commits intomasterfromfeature/validate
May 31, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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
2 changes: 1 addition & 1 deletionsrc/build.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -124,7 +124,7 @@ async function build(args: string[]) {
// write tutorial
if(tutorial){
try{
awaitwrite(options.output,JSON.stringify(tutorial),"utf8");
awaitwrite(options.output,JSON.stringify(tutorial,null,2),"utf8");
console.info(`Success! See output at${options.output}`);
}catch(e){
console.error("Error writing tutorial json file:");
Expand Down
60 changes: 32 additions & 28 deletionssrc/utils/commits.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -45,41 +45,45 @@ export async function getCommits({
thrownewError(`Code branch "${codeBranch}" not found`);
}

console.log("branches",branches);

// Checkout the code branches
awaitgit.checkout(codeBranch);

console.log("checked out");

// Load all logs
constlogs=awaitgit.log();

console.log("logs",logs);
// track the original branch in case of failure
constoriginalBranch=branches.current;

// Filter relevant logs
constcommits:CommitLogObject={};

for(constcommitoflogs.all){
constmatches=commit.message.match(
/^(?<stepId>(?<levelId>L\d+)(S\d+))(?<stepType>[QA])?/
);

if(matches&&matches.length){
// Use an object of commit arrays to collect all commits
constposition=matches[0];
if(!commits[position]){
// does not exist, create the list
commits[position]=[commit.hash];
}else{
// add to the list
commits[position].push(commit.hash);
try{
// Checkout the code branches
awaitgit.checkout(codeBranch);

// Load all logs
constlogs=awaitgit.log();

for(constcommitoflogs.all){
constmatches=commit.message.match(
/^(?<stepId>(?<levelId>L\d+)(S\d+))(?<stepType>[QA])?/
);

if(matches&&matches.length){
// Use an object of commit arrays to collect all commits
constposition=matches[0];
if(!commits[position]){
// does not exist, create the list
commits[position]=[commit.hash];
}else{
// add to the list
commits[position].push(commit.hash);
}
}
}
}catch(e){
console.error("Error with checkout or commit matching");
thrownewError(e.message);
}finally{
// revert back to the original branch on failure
awaitgit.checkout(originalBranch);
// cleanup the tmp directory
awaitrmdir(tmpDir,{recursive:true});
}

console.log("remove");
// cleanup the tmp directory
awaitrmdir(tmpDir,{recursive:true});
returncommits;
}
1 change: 1 addition & 0 deletionssrc/utils/parse.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -98,6 +98,7 @@ export function parse(params: ParseParams): any {
constmdContent:TutorialFrame=parseMdContent(params.text);

constparsed:Partial<T.Tutorial>={
version:params.config.version,
summary:mdContent.summary,
config:params.config.config,
levels:[],
Expand Down
2 changes: 1 addition & 1 deletionsrc/utils/schema/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -193,7 +193,7 @@ export default {
"The solution commits that can be loaded if the user gets stuck. It can also run commands and/or open files",
},
{
required:["commits"],
required:[],
},
],
},
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp