[in] create /version file based on git tag name

This commit is contained in:
Dr Nic Williams
2015-04-25 12:46:22 -07:00
parent f224bc5a45
commit 5779770b0b
4 changed files with 32 additions and 2 deletions

View File

@@ -236,7 +236,7 @@ var _ = Describe("In Command", func() {
))
})
It("stores tag in a file", func() {
It("stores git tag in a file", func() {
_, err := os.Stat(filepath.Join(destDir, "tag"))
Ω(err).ShouldNot(HaveOccurred())
@@ -246,6 +246,16 @@ var _ = Describe("In Command", func() {
Ω(string(tag)).Should(Equal("v0.35.0"))
})
It("stores version in a file", func() {
_, err := os.Stat(filepath.Join(destDir, "version"))
Ω(err).ShouldNot(HaveOccurred())
version, err := ioutil.ReadFile(filepath.Join(destDir, "version"))
Ω(err).ShouldNot(HaveOccurred())
Ω(string(version)).Should(Equal("0.35.0"))
})
It("fetches from the latest release", func() {
_, err := os.Stat(filepath.Join(destDir, "example.txt"))
Ω(err).ShouldNot(HaveOccurred())