Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

scm-check.yml 3.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  1. #
  2. # This workflow checks if Scientific Colour Maps has a new release.
  3. # If a new release if found, it will open an issue automatically.
  4. #
  5. # http://www.fabiocrameri.ch/colourmaps.php
  6. #
  7. name: SCM Check
  8. on:
  9. # uncomment the 'pull_request' line to enable testing in PRs
  10. # pull_request:
  11. schedule:
  12. # weekly cron job
  13. - cron: '0 0 * * 0'
  14. jobs:
  15. scm-check:
  16. name: SCM Check
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Check the latest release
  20. id: scm
  21. run: |
  22. scm_version_in_gmt=7.0.1
  23. # Get version string and date from Zenodo API
  24. # https://doi.org/10.5281/zenodo.1243862
  25. scm_version=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.version' | sed 's/"//g')
  26. scm_version_date=$(curl -Ls https://zenodo.org/api/records/1243862 | jq '.metadata.publication_date' | sed 's/"//g')
  27. echo "SCM version ${scm_version} (${scm_version_date})"
  28. # Set output of the current step
  29. echo "::set-output name=scm_version::${scm_version}"
  30. echo "::set-output name=scm_version_date::${scm_version_date}"
  31. if [ "${scm_version}" != ${scm_version_in_gmt} ]; then
  32. echo "The latest SCM version (${scm_version}) is different the one in GMT (${scm_version_in_gmt})!"
  33. echo "::set-output name=error_code::2"
  34. fi
  35. - name: Create an update request
  36. if: ${{ steps.scm.outputs.error_code == 2 }}
  37. uses: nashmaniac/create-issue-action@v1.1
  38. with:
  39. title: New ScientificColourMaps version ${{ steps.scm.outputs.scm_version }} found
  40. token: ${{secrets.GITHUB_TOKEN}}
  41. body: |
  42. A new Scientific Colour Maps release was found.
  43. - website: http://www.fabiocrameri.ch/colourmaps.php
  44. - version: ${{ steps.scm.outputs.scm_version }}
  45. - date: ${{ steps.scm.outputs.scm_version_date }}
  46. Todo list:
  47. - [ ] Download latest ScientificColourMapsV.zip file from https://doi.org/10.5281/zenodo.1243862
  48. to a folder, e.g. ~/Downloads/ScientificColourMapsV, where V is the version number (e.g. 7).
  49. - [ ] Run `./admin/build-scientific-colors-cpt.sh ~/Downloads/ScientificColourMapsV/` to update CPTs.
  50. - [ ] Move newly generated CPTs to `share/cpt` using `mv ~/Downloads/ScientificColourMapsV/gmt_cpts/* share/cpt/`
  51. - [ ] Make sure to update the following files:
  52. - [ ] Version number in `admin/build-scientific-colors-cpt.sh` and `.github/workflows/scm-check.yml`
  53. - [ ] List of colour maps in `src/gmt_cpt_masters.h` using lines in `/tmp/cpt_strings.txt` (only if new colour maps were added)
  54. - [ ] Counts of colour maps in `doc/rst/source/cookbook/cpts.rst` (only if new colour maps were added)
  55. - [ ] List of colour maps and counts in `doc/scripts/GMT_App_M_1*.sh` (only if new colour maps were added)
  56. - [ ] Update the associated `doc/scripts/GMT_App_M_1*.ps` file(s)
  57. - [ ] Commit all changes and open a PR
  58. **Note**: If new CPTs were added (check using `ls ~/Downloads/ScientificColourMaps`), update the
  59. `admin/build-scientific-colors-cpt.sh` script first to include the new CPTs, and then rerun it again.
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...