Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Invalid Semantic Version #21

Closed
rohrschacht opened this issue Aug 18, 2021 · 3 comments
Closed

Invalid Semantic Version #21

rohrschacht opened this issue Aug 18, 2021 · 3 comments

Comments

@rohrschacht
Copy link
Contributor

Description

When installing buffalo from source using this new cli repo, the version reported by buffalo seems wrong. buffalo version reports: INFO[0000] Buffalo version is: main rather than a specific version like v0.17.1. When running buffalo info, it also reports this as an error:

$ buffalo info
[...]
-> Buffalo (CLI): Checking minimum version requirements
✘ Invalid Semantic Version
[...]

This also seems to mess up some of the generation when using buffalo new or buffalo fix. For example the generated Dockerfile starts with FROM gobuffalo/buffalo:main as builder, where the tag 'main' does not seem to exist as far as I can see, while tags like 'gobuffalo/buffalo:v0.17.1' do exist.

This happens when installing the buffalo cli like stated in the README of this git repo, or as stated on gobuffalo.io, doesn't matter which one:

$ go install github.com/gobuffalo/cli/cmd/buffalo@latest

OR

$ go install github.com/gobuffalo/cli/cmd/[email protected]

Steps to Reproduce the Problem

This is reproducible in a clean environment such as a docker container.

  1. Start fresh golang container through docker or podman
  2. go install github.com/gobuffalo/cli/cmd/[email protected] OR go install github.com/gobuffalo/cli/cmd/buffalo@latest, both have the same problem
  3. buffalo version reports INFO[0000] Buffalo version is: main

Expected Behavior

buffalo should know it's current version and also use this when generating the Dockerfile for example.

Actual Behavior

buffalo reports main as its version and uses this 'version' when generating the Dockerfile.

Info

Please run buffalo info and paste the information below where it says "PASTE_HERE".

This is from a clean golang docker container:

-> Go: Checking installation
✓ The `go` executable was found on your system at: /usr/local/go/bin/go

-> Go: Checking minimum version requirements
✓ Your version of Go, 1.16.6, meets the minimum requirements.

-> Go: Checking Package Management
✓ You are using Go Modules (`go`) for package management.

-> Go: Checking PATH
✓ Your PATH contains /go/bin.

-> Node: Checking installation
✘ The `node` executable could not be found on your system.
For help setting up your Node environment please follow the instructions for you platform at:

https://nodejs.org/en/download/

-> NPM: Checking installation
✘ The `npm` executable could not be found on your system.
For help setting up your NPM environment please follow the instructions for you platform at:

https://docs.npmjs.com/getting-started/configuring-your-local-environment

-> Yarn: Checking installation
✘ The `yarnpkg` executable could not be found on your system.
For help setting up your Yarn environment please follow the instructions for you platform at:

https://yarnpkg.com/en/docs/install

-> PostgreSQL: Checking installation
✘ The `postgres` executable could not be found on your system.
For help setting up your Postgres environment please follow the instructions for you platform at:

https://www.postgresql.org/download/

-> MySQL: Checking installation
✘ The `mysql` executable could not be found on your system.
For help setting up your MySQL environment please follow the instructions for you platform at:

https://www.mysql.com/downloads/

-> SQLite3: Checking installation
✘ The `sqlite3` executable could not be found on your system.
For help setting up your SQLite3 environment please follow the instructions for you platform at:

https://www.sqlite.org/download.html

-> Cockroach: Checking installation
✘ The `cockroach` executable could not be found on your system.
For help setting up your Cockroach environment please follow the instructions for you platform at:

https://www.cockroachlabs.com/docs/stable/

-> Buffalo (CLI): Checking installation
✓ The `buffalo` executable was found on your system at: /go/bin/buffalo

-> Buffalo (CLI): Checking minimum version requirements
✘ Invalid Semantic Version

-> Buffalo: Application Details
Pwd         /go/src/test.de/coke
Root        /go/src/test.de/coke
GoPath      /go
PackagePkg  test.de/coke
ActionsPkg  test.de/coke/actions
ModelsPkg   test.de/coke/models
GriftsPkg   test.de/coke/grifts
WithModules true
Name        coke
Bin         bin/coke
VCS         git
WithPop     true
WithSQLite  false
WithDep     false
WithWebpack true
WithNodeJs  true
WithYarn    true
WithDocker  true
WithGrifts  true
AsWeb       true
AsAPI       false
InApp       true
PackageJSON {map[]}

-> Buffalo: config/buffalo-app.toml
name = "coke"
bin = "bin/coke"
vcs = "git"
with_pop = true
with_sqlite = false
with_dep = false
with_webpack = true
with_nodejs = true
with_yarn = true
with_docker = true
with_grifts = true
as_web = true
as_api = false

-> Buffalo: config/buffalo-plugins.toml
[[plugin]]
  binary = "buffalo-pop"
  go_get = "github.com/gobuffalo/buffalo-pop/v2"

-> Buffalo: go.mod
module test.de/coke

go 1.16

require github.com/gobuffalo/buffalo-pop/v2 v2.3.0 // indirect
@fasmat
Copy link
Member

fasmat commented Sep 1, 2021

Hi @rohrschacht,

I think I've identified the cause of the issue you are describing. You are seeing this behavior because go install github.com/gobuffalo/cli/cmd/buffalo@latest doesn't set the version number of the release while building it locally, so it defaults to "main".

To have this fixed immediately you can use the pre-built binaries from the github page. I will create a PR for @paganotoni that should also fix the issue for the next version when you install it using go install: #24

@github-actions
Copy link

github-actions bot commented Oct 2, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions
Copy link

github-actions bot commented Oct 7, 2021

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Oct 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants