mirror of
https://github.com/elyby/chrly.git
synced 2025-01-05 11:41:49 +05:30
Merge branch 'develop'
This commit is contained in:
commit
e33b86b809
@ -26,7 +26,7 @@ variables:
|
|||||||
.docker_template: &setup_docker_environment
|
.docker_template: &setup_docker_environment
|
||||||
image: docker:latest
|
image: docker:latest
|
||||||
before_script:
|
before_script:
|
||||||
- docker login -u gitlab-ci -p $CI_BUILD_TOKEN registry.ely.by
|
- docker login -u gitlab-ci -p $CI_JOB_TOKEN registry.ely.by
|
||||||
- export TEMP_IMAGE_NAME="$CONTAINER_IMAGE:$CI_PIPELINE_ID"
|
- export TEMP_IMAGE_NAME="$CONTAINER_IMAGE:$CI_PIPELINE_ID"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
@ -39,12 +39,12 @@ build executable:
|
|||||||
<<: *setup_go_environment
|
<<: *setup_go_environment
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- export VERSION="${CI_BUILD_TAG:-dev-$CI_BUILD_REF_NAME-${CI_BUILD_REF:0:8}+build-$CI_BUILD_ID}"
|
- export VERSION="${CI_COMMIT_TAG:-dev-$CI_COMMIT_REF_NAME-${CI_COMMIT_SHA:0:8}+build-$CI_JOB_ID}"
|
||||||
- >
|
- >
|
||||||
env GOOS=linux
|
env GOOS=linux
|
||||||
go build
|
go build
|
||||||
-o $CI_PROJECT_DIR/minecraft-skinsystem
|
-o $CI_PROJECT_DIR/minecraft-skinsystem
|
||||||
-ldflags "-X ${CI_PROJECT_NAMESPACE}/bootstrap.version=${VERSION}"
|
-ldflags "-X ${CI_PROJECT_PATH}/bootstrap.version=${VERSION}"
|
||||||
main.go
|
main.go
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "${CI_JOB_STAGE} executable"
|
name: "${CI_JOB_STAGE} executable"
|
||||||
@ -79,7 +79,7 @@ push tag:
|
|||||||
variables:
|
variables:
|
||||||
GIT_STRATEGY: none
|
GIT_STRATEGY: none
|
||||||
script:
|
script:
|
||||||
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_BUILD_TAG"
|
- export IMAGE_NAME="$CONTAINER_IMAGE:$CI_COMMIT_TAG"
|
||||||
- export LATEST_IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
- export LATEST_IMAGE_NAME="$CONTAINER_IMAGE:latest"
|
||||||
- docker tag $TEMP_IMAGE_NAME $IMAGE_NAME
|
- docker tag $TEMP_IMAGE_NAME $IMAGE_NAME
|
||||||
- docker tag $TEMP_IMAGE_NAME $LATEST_IMAGE_NAME
|
- docker tag $TEMP_IMAGE_NAME $LATEST_IMAGE_NAME
|
||||||
|
23
cmd/version.go
Normal file
23
cmd/version.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
package cmd
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/spf13/cobra"
|
||||||
|
"elyby/minecraft-skinsystem/bootstrap"
|
||||||
|
"runtime"
|
||||||
|
)
|
||||||
|
|
||||||
|
var versionCmd = &cobra.Command{
|
||||||
|
Use: "version",
|
||||||
|
Short: "Show the Minecraft Skinsystem version information",
|
||||||
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
|
fmt.Printf("Version: %s\n", bootstrap.GetVersion())
|
||||||
|
fmt.Printf("Go version: %s\n", runtime.Version())
|
||||||
|
fmt.Printf("OS/Arch: %s/%s\n", runtime.GOOS, runtime.GOARCH)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
RootCmd.AddCommand(versionCmd)
|
||||||
|
}
|
@ -1,5 +1,9 @@
|
|||||||
FROM alpine:3.6
|
FROM alpine:3.6
|
||||||
|
|
||||||
|
RUN apk --update add ca-certificates \
|
||||||
|
&& update-ca-certificates \
|
||||||
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
COPY docker/docker-entrypoint.sh /usr/local/bin/
|
COPY docker/docker-entrypoint.sh /usr/local/bin/
|
||||||
COPY docker/config.dist.yml /usr/local/etc/minecraft-skinsystem/
|
COPY docker/config.dist.yml /usr/local/etc/minecraft-skinsystem/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user