Fix build on macOS
Overview
macOS directory is not case senstative. It gets confused when there is a
file name VERSION and a directory called version
and there are
conflicts which prevents macOS users from building the application.
Remove the version
package since we don't really need packages for a 2
file application.
How to test
-
Compile the application
make compile
make compile
$ make compile go build \ -o build/tlsctl \ -ldflags "-X main.VERSION=0.1.0-beta-22-g1e52941 -X main.REVISION=1e52941 -X main.BRANCH=fix-versions-macos -X main.BUILT=2021-02-04T09:26:55+0000 -s -w" \ .
-
Print the version
./build/tlsctl -v
./build/tlsctl -v
$ ./build/tlsctl -v tlsctl Version: 0.1.0-beta-22-g1e52941 Git revision: 1e52941 Git branch: fix-versions-macos GO version: go1.15.5 Built: 2021-02-04T09:26:55+0000 OS/Arch: darwin/amd6
-
Print help text
./build/tlsctl -h
./build/tlsctl -h
$ ./build/tlsctl help NAME: tlsctl - Set of commands to debug TLS certificates for GitLab Runner. USAGE: tlsctl [global options] command [command options] [arguments...] VERSION: 0.1.0-beta-22-g1e52941 (1e52941) DESCRIPTION: Set of commands to debug TLS certificates for GitLab Runner. AUTHOR: GitLab Inc. <support@gitlab.com> COMMANDS: save Use GitLab Runner TLS verification and save the chain in a file info Print information about each cert in a chain. chain Print the chain of a certificate. help, h Shows a list of commands or help for one command GLOBAL OPTIONS: --help, -h show help --version, -v print the version
Edited by Steve Xuereb