Skip to content

Commit

Permalink
previous-version
Browse files Browse the repository at this point in the history
  • Loading branch information
sahar-frikha committed Aug 17, 2022
1 parent 448c99b commit 4a2aef6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/profile_generation_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,25 @@ def get_previous_version(path_changed_file):
previous_version=""

mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1]
print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL)
#print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL)
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
print(Fore.LIGHTRED_EX + 'onlyfiles: ' + onlyfiles + Style.RESET_ALL)

for f in onlyfiles:
if f.split('_')[1].split('.')[0].split('-')[1]=="DRAFT":
print(Fore.LIGHTRED_EX + 'onlyfiles: ' + f + Style.RESET_ALL)

return previous_version

def get_previous_release(path_changed_file):
previous_release=""
mypath=path_changed_file.split('/')[0]+"/"+path_changed_file.split('/')[1]
#print(Fore.LIGHTRED_EX + 'mypath: ' + mypath + Style.RESET_ALL)
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]

for f in onlyfiles:
if f.split('_')[1].split('.')[0].split('-')[1]=="RELEASE":
print(Fore.LIGHTBLUE_EX + 'onlyfiles: ' + f + Style.RESET_ALL)

return previous_release

# if its draft it's revision, case release, deprecated
Expand Down
2 changes: 1 addition & 1 deletion ComputationalTool/jsonld/ComputationalTool_v0.7-DRAFT.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
]
},
"citation": {
"description": "yrtyr about this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.",
"description": "yrtyr eee this tool. A citation or reference to another creative work, such as another publication, web page, scholarly article, etc.",
"anyOf": [
{
"$ref": "#/definitions/creativework"
Expand Down

0 comments on commit 4a2aef6

Please sign in to comment.