Skip to content

Commit

Permalink
treat dates as strings
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsherrill committed Feb 7, 2024
1 parent 949365f commit 1c09c95
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
- name: Get current version from file
id: getRelease
run: |
curl https://raw.githubusercontent.com/candlepin/candlepin/main/api/candlepin-api-spec.yaml -o candlepin-api-spec.yaml
curl https://raw.githubusercontent.com/candlepin/candlepin/main/api/candlepin-api-spec.yaml -o candlepin-api-times.yaml
# candlepin dates are not in the format that go requires (a subset of RFC-3339), treat them as strings
cat candlepin-api-times.yaml | grep -v "format: date-time" > candlepin-api-spec.yaml
yq -r '.info.version' < candlepin-api-spec.yaml
version="`yq -r '.info.version' < candlepin-api-spec.yaml`"
major="v`echo $version | awk -F '.' '{print $1}'`"
Expand All @@ -33,7 +35,6 @@ jobs:
echo "version=$version" >> $GITHUB_OUTPUT
echo "tag=$tag" >> $GITHUB_OUTPUT
echo "major=$major" >> $GITHUB_OUTPUT
# If check passes, latest build is up to date and the action stops
- name: Update version
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@

# Go workspace file
go.work

.idea
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
# caliri
A Go client for Candlepin
A Go api client for Candlepin

## Installation
```
go get github.com/content-services/caliri/release/v4
```

## Usage



## Notes

* due to Go not being able to parse all dates that are RFC-3339 compliant, and candlepin using a very specific format, all date-time objects are treated as strings

0 comments on commit 1c09c95

Please sign in to comment.