-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de5bd0f
commit 1c9f2ef
Showing
7 changed files
with
96 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM ubuntu:latest | ||
|
||
COPY goenv /usr/local/bin | ||
|
||
RUN \ | ||
apt-get update \ | ||
&& apt-get install -y ca-certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BUILD_METADATA=+$(shell git rev-parse --short HEAD) | ||
PRERELEASE= | ||
SEMVER=0.0.1 | ||
|
||
build: | ||
@go build -ldflags="-X 'github.com/drewgonzales360/goenv/version.Semver=${SEMVER}${PRERELEASE}${BUILD_METADATA}'" | ||
|
||
image: build | ||
@docker build -t goenv . | ||
|
||
run-image: | ||
@docker run --rm -it goenv bash -c 'goenv install 1.18; go version' | ||
|
||
tty: | ||
@docker run --rm -it goenv bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
package version | ||
|
||
import ( | ||
"github.com/Masterminds/semver" | ||
) | ||
|
||
// AppName represents the name of the application | ||
const AppName = "app-name" | ||
const AppName = "goenv" | ||
|
||
// Version semvers the app | ||
const Version = "0.0.1" | ||
var Semver string = "unknown; please create an issue for the maintainers" | ||
|
||
func Version() *semver.Version { | ||
return semver.MustParse(Semver) | ||
} |