Skip to content

Commit

Permalink
Changed progress.py csv output to be compatible with new website (zel…
Browse files Browse the repository at this point in the history
…daret#1075)

* Changed progress.py csv output to be compatible with new website

* Increment and clarify csv version

* Update csv paths
  • Loading branch information
EllipticEllipsis committed Dec 18, 2021
1 parent 05b2cbf commit 383a95d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ pipeline {
}
steps {
sh 'mkdir reports'
sh 'python3 progress.py csv >> reports/progress.csv'
sh 'python3 progress.py csv -m >> reports/progress_matching.csv'
sh 'python3 progress.py shield-json > reports/progress_shield.json'
sh 'python3 progress.py csv >> reports/progress-oot-nonmatching.csv'
sh 'python3 progress.py csv -m >> reports/progress-oot-matching.csv'
sh 'python3 progress.py shield-json > reports/progress-oot-shield.json'
stash includes: 'reports/*', name: 'reports'
}
}
Expand All @@ -54,9 +54,9 @@ pipeline {
}
steps {
unstash 'reports'
sh 'cat reports/progress.csv >> /var/www/html/reports/progress.csv'
sh 'cat reports/progress_matching.csv >> /var/www/html/reports/progress_matching.csv'
sh 'cat reports/progress_shield.json > /var/www/html/reports/progress_shield.json'
sh 'cat reports/progress-oot-nonmatching.csv >> /var/www/zelda64.dev/assets/csv/progress-oot-nonmatching.csv'
sh 'cat reports/progress-oot-matching.csv >> /var/www/zelda64.dev/assets/csv/progress-matching.csv'
sh 'cat reports/progress-oot-shield.json > /var/www/zelda64.dev/assets/csv/progress-oot-shield.json'
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
[jenkins]: https://jenkins.deco.mp/job/OOT/job/master
[jenkins-badge]: https://img.shields.io/jenkins/build?jobUrl=https%3A%2F%2Fjenkins.deco.mp%2Fjob%2FOOT%2Fjob%2Fmaster

[progress]: https://zelda64.dev/progress.html
[progress-badge]: https://img.shields.io/endpoint?url=https://zelda64.dev/reports/progress_shield.json
[progress]: https://zelda64.dev/games/oot
[progress-badge]: https://img.shields.io/endpoint?url=https://zelda64.dev/assets/csv/progress-oot-shield.json

[contributors]: https://github.com/zeldaret/oot/graphs/contributors
[contributors-badge]: https://img.shields.io/github/contributors/zeldaret/oot
Expand Down
4 changes: 2 additions & 2 deletions progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def GetNonMatchingSize(path):
bytesPerHeartPiece = total // 80

if args.format == 'csv':
version = 1
csv_version = 2
git_object = git.Repo().head.object
timestamp = str(git_object.committed_date)
git_hash = git_object.hexsha
csv_list = [str(version), timestamp, git_hash, str(code), str(codeSize), str(boot), str(bootSize), str(ovl), str(ovlSize), str(src), str(nonMatchingASM), str(len(nonMatchingFunctions))]
csv_list = [str(csv_version), timestamp, git_hash, str(src), str(total), str(code), str(codeSize), str(boot), str(bootSize), str(ovl), str(ovlSize), str(nonMatchingASM), str(len(nonMatchingFunctions))]
print(",".join(csv_list))
elif args.format == 'shield-json':
# https://shields.io/endpoint
Expand Down

0 comments on commit 383a95d

Please sign in to comment.