Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(snap): set Pebble version before snap builds (#450)
# Problem When doing a `snapcraft remote-build`, Snapcraft will create a copy of the project in Launchpad before running the snap build. The **problem** is that Snapcraft seems to ignore tags while creating the copy of the project, which means the `go generate ./cmd` in the `snapcraft.yaml`'s `override-build` will never dynamically generate the right version. # Solution This PR enforces the execution of `go generate ./cmd` as a pre-requisite for running the snap build. I.e., for both local and remote builds, `go generate ./cmd` must be run first, such that the `VERSION` and `version_generated.go` files are staged in the repo, prior to the snap build, such that the `override-build` script can simply rely on that information and thus ignore the missing Git refs in the LP's project.
- Loading branch information