Merge branch 'master' of ssh://git.jonasfranz.software:10022/JonasFranzDEV/gitea-github-migrator into web-ui

web-ui
Jonas Franz 6 years ago
commit ae9f373e2e
Signed by untrusted user: JonasFranzDEV
GPG Key ID: 506AEEBE80BEDECD
  1. 19
      .drone.yml
  2. 18
      Dockerfile
  3. 27
      Gopkg.toml
  4. 46
      Makefile
  5. 2
      README.md

@ -44,18 +44,14 @@ pipeline:
environment:
GOPATH: /go
commands:
- go get -u golang.org/x/lint/golint
- golint -set_exit_status $(go list ./...)
- go vet ./...
- go test -cover ./...
- make test
static:
image: golang:1.10
pull: true
environment:
GOPATH: /go
commands:
- go get -u github.com/mitchellh/gox
- gox -ldflags "-X main.version=${DRONE_TAG##v} -X main.build=${DRONE_BUILD_NUMBER}" -output "releases/gitea-github-migrator_{{.OS}}_{{.Arch}}"
- make release
when:
event: [ tag ]
clean:
@ -76,4 +72,13 @@ pipeline:
- sha256
- md5
when:
event: [ tag ]
event: [ tag ]
docker:
image: plugins/docker:17.12
secrets: [ docker_username, docker_password ]
pull: true
repo: jonasfranz/gitea-github-migrator
default_tags: true
when:
event: [ push, tag ]
branch: [ master ]

@ -0,0 +1,18 @@
#Build stage
FROM golang:1.10-alpine3.7 AS build-env
#Build deps
RUN apk --no-cache add build-base git
#Setup repo
COPY . ${GOPATH}/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
WORKDIR ${GOPATH}/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
RUN make docker-binary
FROM alpine:3.7
LABEL maintainer="info@jonasfranz.software"
COPY --from=build-env /go/src/git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/gitea-github-migrator /usr/local/bin/gitea-github-migrator
ENTRYPOINT ["/usr/local/bin/gitea-github-migrator"]

@ -1,30 +1,3 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[prune]
go-tests = true
unused-packages = true

@ -0,0 +1,46 @@
IMPORT := git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator
GO ?= go
BUILD=$(or ${DRONE_BUILD_NUMBER},${DRONE_BUILD_NUMBER},0)
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
else
ifneq ($(DRONE_BRANCH),)
VERSION ?= $(subst release/v,,$(DRONE_BRANCH))
else
VERSION ?= master
endif
endif
LDFLAGS := -X main.Version=$(VERSION) -X main.build=$(BUILD)
.PHONY: all
all:
.PHONY: docker-binary
docker-binary:
go build -ldflags "$(LDFLAGS)" -o gitea-github-migrator
.PHONY: release
release:
@hash gox > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/mitchellh/gox; \
fi
gox -ldflags "$(LDFLAGS)" -output "releases/gitea-github-migrator_{{.OS}}_{{.Arch}}"
.PHONY: lint
lint:
@hash golint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u golang.org/x/lint/golint; \
fi
golint -set_exit_status $(go list ./...)
.PHONY: vet
vet:
go vet ./...
.PHONY: test
test: lint vet
go test -cover ./...

@ -1,6 +1,8 @@
# gitea-github-migrator
[![Build Status](https://drone.jonasfranz.software/api/badges/JonasFranzDEV/gitea-github-migrator/status.svg)](https://drone.jonasfranz.software/JonasFranzDEV/gitea-github-migrator)
[![Latest Release](https://img.shields.io/badge/dynamic/json.svg?label=release&url=https%3A%2F%2Fgit.jonasfranz.software%2Fapi%2Fv1%2Frepos%2FJonasFranzDEV%2Fgitea-github-migrator%2Freleases&query=%24%5B0%5D.tag_name)](https://git.jonasfranz.software/JonasFranzDEV/gitea-github-migrator/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/jonasfranz/gitea-github-migrator.svg)](https://hub.docker.com/r/jonasfranz/gitea-github-migrator/)
A tool to migrate [GitHub](https://github.com) Repositories to [Gitea](https://gitea.io) including all issues, labels, milestones
and comments.

Loading…
Cancel
Save