datalad / git-annex

A non-official clone of git-annex established for DataLad purposes. No PRs will be merged, but could be used to test perspective git-annex patches. Official git-annex repository: https://git.kitenet.net/index.cgi/git-annex.git/
14 stars 3 forks source link

Use `gh api` instead of `curl` for direct GitHub API queries #202

Closed jwodder closed 1 month ago

yarikoptic commented 1 month ago

windows might need special attention... so is leading / generally omittable?

Run if [ "release" = "release" ]; then
  if [ "release" = "release" ]; then
    commitish="$(gh api --jq .tag_name /repos/datalad/datalad/releases/latest)"
  else
    commitish="release"
  fi
  python -m pip install --upgrade pip
  pip install git+https://github.com/datalad/datalad@${commitish}
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    LANG: C.utf-8
    DATALAD_TESTS_SSH: 1
    pythonLocation: C:\hostedtoolcache\windows\Python\3.8.10\x64
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.8.10\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python[2](https://github.com/datalad/git-annex/actions/runs/9158606331/job/25177694459?pr=202#step:18:2)_ROOT_DIR: C:\hostedtoolcache\windows\Python\[3](https://github.com/datalad/git-annex/actions/runs/9158606331/job/25177694459?pr=202#step:18:3).8.10\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x6[4](https://github.com/datalad/git-annex/actions/runs/9158606331/job/25177694459?pr=202#step:18:4)
    GITHUB_TOKEN: ***
invalid API endpoint: "C:/Program Files/Git/repos/datalad/datalad/releases/latest". Your shell might be rewriting URL paths as filesystem paths. To avoid this, omit the leading slash from the endpoint argument
Error: Process completed with exit code 1.
jwodder commented 1 month ago

Wow, Windows is truly a colossal dumpster fire of an OS.

Addressed.