Commit Graph

7 Commits

Author SHA1 Message Date
Dave Protasowski 3764d73bf9
fix linting (#2555) 2022-07-22 15:28:21 +00:00
Dave Protasowski 1ad02a5662
Drop error from changeset.Get signature (#2549)
* Drop error from changeset.Get signature

We simply return 'unknown'

* update mako/sidecar's use of changeset
2022-07-18 16:36:59 +00:00
Dave Protasowski 473ba31eb9
Bump min go version to 1.18 && read build info from embedded binary (#2548)
* Bump min go version to 1.18 & read build SHA from binary

* GitHub Commit ID is really a Git Revision

* update go.sum

* fix spelling

* Address PR feedback

- Use a sync.Once to prevent double parsing
- Support SHA256
- Allow non-SHA revision strings

* Don't include 'unknown' revision value in logs
2022-07-18 14:57:59 +00:00
Billy Lynch 3b550aff99
changeset: Look in packed-refs file if ref file not found. (#2425)
If you have a lot of refs in a repo, git will eventually start
condensing them into a single file instead of letting them sprawl out in
separate directories on the filesystem. This change lets the changeset
package use the packed-refs file as a fall back in the event that the
ref file is not found.

See https://git-scm.com/docs/git-pack-refs for more details on packed
refs.
2022-02-17 07:28:13 -08:00
Victor Agababov 7e6f1f48c9 Some cleanups to the changeset code (#577) 2019-08-15 11:22:08 -07:00
Matt Moore 426561fd09 Add support for resolving refs, when linked. (#576)
With https://github.com/google/ko/pull/73 we can link the Git ref information
into images with:
```
ln -r -s .git/refs ./cmd/foo/kodata
```

If the changeset package gets a `ref: <ref>` entry, it attempts to read that
file from `KO_DATA_PATH` next, which lets the changeset work much more effectively.
2019-08-15 10:01:08 -07:00
Yanwei Guo 088e3f7faf Add the commit ID key as constant for log label (#158)
* add the commit id constant

* add changeset lib

* add doc.go with explanation
2018-11-06 14:59:36 -08:00