ACCESS-NRI / ACCESS-OM2

ACCESS-OM2: ACCESS Ocean-Sea Ice Model
Apache License 2.0
5 stars 0 forks source link

'Rolling Tag' logic for pre/release builds #47

Closed CodeGat closed 7 months ago

CodeGat commented 8 months ago

In this PR:

 * cd.yml: Moved tagging logic to before deployment

This fixes up the issue of the spack.yaml file (specifically, the spack.specs access-om2@git.tag) looking to clone the tag that doesn't exist (yet). We add a rolling tag for the prerelease branch so the build can progress, and then when it is merged, place the tag in it's rightful position on the main branch.

This 'rolling tag' logic is noted here:

gitGraph
  commit tag: "2024.01.1"
  branch pre-2024.02.1
  commit tag: "2024.02.1"

And then when the next commit comes along:

gitGraph
  commit tag: "2024.01.1"
  branch pre-2024.02.1
  commit
  commit tag: "2024.02.1"

and then when merged:

gitGraph
  commit tag: "2024.01.1"
  branch pre-2024.02.1
  commit
  commit
  checkout main
  merge pre-2024.02.1 tag: "2024.02.1"
CodeGat commented 7 months ago

Prerelease looks like this:

gitGraph
  commit id: "2024.01.1" type: HIGHLIGHT tag: "2024.01.01"
  branch pre-2024.01.2
  checkout pre-2024.01.2
  commit id: "access-om2_2024.01.2-1"
  commit id: "access-om2_2024.01.2-2"
  commit id: "access-om2_2024.01.2-3"
  checkout main
  merge pre-2024.01.2 id: "2024.01.2" type: HIGHLIGHT tag: "2024.01.2"