This repository was archived by the owner on Aug 24, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +788
-0
lines changed Expand file tree Collapse file tree 9 files changed +788
-0
lines changed Original file line number Diff line number Diff line change 1+ # These are supported funding model platforms
2+
3+ open_collective : git-bug
Original file line number Diff line number Diff line change 1+ git-bug-migration
2+ .gitkeep
3+ dist
4+ coverage.txt
5+ .idea /
Original file line number Diff line number Diff line change 1+ matrix :
2+ include :
3+ - language : go
4+ go : 1.12.x
5+ - language : go
6+ go : 1.13.x
7+ - language : go
8+ go : 1.14.x
9+
10+ env :
11+ GO111MODULE=on
12+
13+ install :
14+ - make install
15+
16+ script :
17+ - make test
18+
19+ before_install :
20+ - go get github.com/mitchellh/gox
21+
22+ after_success :
23+ - if [ ! -z "$TRAVIS_TAG" ]; then make releases; fi
24+
25+ deploy :
26+ provider : releases
27+ skip_cleanup : true
28+ api_key :
29+ secure : fLW37YkuY7KhVGpS6kgAAZPxgnePkLJG6AhWArOdVjgF0LMpps3PdvmfLkt+UUwjN0B+7l5NZSNU6c7F7R9AtJG5sfI7glFYxhQj3SdDr3rJCM1jqiJoCpkMGNHaJXsuGN1T/fWyfhHkhhyucbPv0d16llOsw98h7dIR1tCEFqMbfyA2G0182uKlOgZ/cjQGTRvU2hFgRpVHWCPcZkG+d0anLyCHtECXAwVQO5cijwNa4a7BEvIIYKRK6/j/GTrn9SqTisww3n1wxaItmEL91HbR6oqKrU9lUCJ6dTI/3JszKfLxrxGSSmwgtxa2tccV8AfmiqMXk4dISsHWwMthFzCp+I0htbdm5d1hbx9Jfq+5zJjV5Vka5ewfpWwSMOKkZpsEspjSy7iQPLk8IvkDq8t7NQ8kU2j5Z//nEEFa1Rym+sWsKhzas6fs09hv5V9p5iCU0bCnrncavhD6u1NN6FaYlZtBz8a0p2SyOrgW2Yglg37IKsZPW805e+6L7L515+jQ5OkdbrGsHr9ko3YG0OX1UkMfJ7ntQXfNeADHP90TmML8t7t+O8pNFFRiQUDPO0rbytXwneQoE/Jhdmj10Rhqi/OEm5A5uV5smItc7eg2OE6lBWYOeIQyGpQrh6eTx9cO+osX0o5ROMr4IVhJ0e/rRuR+PCm/2f8JUzHAfsk=
30+ file_glob : true
31+ file : dist/**/*
32+ on :
33+ repo : MichaelMure/git-bug-migration
34+ go : 1.14.x
35+ tags : true
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1+ all : build
2+
3+ GIT_COMMIT: =$(shell git rev-list -1 HEAD)
4+ GIT_LAST_TAG: =$(shell git describe --abbrev=0 --tags)
5+ GIT_EXACT_TAG: =$(shell git name-rev --name-only --tags HEAD)
6+
7+ LDFLAGS: =-X 'main.GitCommit=${GIT_COMMIT}' \
8+ -X 'main.GitLastTag=${GIT_LAST_TAG}' \
9+ -X 'main.GitExactTag=${GIT_EXACT_TAG}'
10+
11+ build :
12+ go build -ldflags " $( LDFLAGS) " .
13+
14+ install :
15+ go install -ldflags " $( LDFLAGS) " .
16+
17+ releases :
18+ gox -ldflags " $( LDFLAGS) " -output " dist/{{.Dir}}_{{.OS}}_{{.Arch}}"
19+
20+ test :
21+ go test -v -bench=. ./...
22+
23+ .PHONY : build install releases test
Original file line number Diff line number Diff line change 1+ <h1 align =" center " >git-bug-migration</h1 >
2+
3+ <div align =" center " >
4+
5+ [ ![ Build Status] ( https://travis-ci.com/MichaelMure/git-bug-migration.svg?branch=master )] ( https://travis-ci.org/MichaelMure/git-bug-migration )
6+ [ ![ Backers on Open Collective] ( https://opencollective.com/git-bug/backers/badge.svg )] ( #backers )
7+ [ ![ Sponsors on Open Collective] ( https://opencollective.com/git-bug/sponsors/badge.svg )] ( #sponsors )
8+ [ ![ License: GPL v3] ( https://img.shields.io/badge/License-GPLv3+-blue.svg )] ( http://www.gnu.org/licenses/gpl-3.0 )
9+ [ ![ Gitter chat] ( https://badges.gitter.im/gitterHQ/gitter.png )] ( https://gitter.im/the-git-bug/Lobby )
10+
11+ </div >
12+
13+ ` git-bug-migration ` is a tool to migrate ` git-bug ` data stored in git repository to a newer format when breaking changes are made in ` git-bug ` .
14+
15+ [ git-bug] ( https://github.com/MichaelMure/git-bug ) is a distributed bug tracker embedded in git.
16+
17+ ## Installation
18+
19+ Pre-compiled binaries are available in the [ release page] ( https://github.com/MichaelMure/git-bug-migration/releases/latest )
20+
21+ ## Usage
22+
23+ 1 . Make a backup copy of your repository
24+ 1 . Run ` git-bug-migration ` from within the repository
25+
26+ ## License
27+
28+ Unless otherwise stated, this project is released under the [ GPLv3] ( LICENSE ) or later license © Michael Muré.
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h
195195golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
196196golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223 /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
197197golang.org/x/sys v0.0.0-20190412213103-97732733099d /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
198+ golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4 =
198199golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
199200golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg =
200201golang.org/x/sys v0.0.0-20200116001909-b77594299b42 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
Original file line number Diff line number Diff line change @@ -11,9 +11,17 @@ import (
1111
1212const rootCommandName = "git-bug-migration"
1313
14+ // These variables are initialized externally during the build. See the Makefile.
15+ var GitCommit = "unset"
16+ var GitLastTag = "unset"
17+ var GitExactTag = "unset"
18+
1419var repo mg1r.ClockedRepo
1520
1621func main () {
22+ // TODO: might be nicer under a --version flag
23+ fmt .Printf ("%s version %s\n \n " , rootCommandName , version ())
24+
1725 Migrate01 ()
1826}
1927
@@ -115,3 +123,14 @@ func Migrate01() {
115123 }
116124 }
117125}
126+
127+ func version () string {
128+ if GitExactTag == "undefined" {
129+ GitExactTag = ""
130+ }
131+ version := GitLastTag
132+ if GitExactTag == "" {
133+ version = fmt .Sprintf ("%s-dev-%.10s" , version , GitCommit )
134+ }
135+ return version
136+ }
File renamed without changes.
You can’t perform that action at this time.
0 commit comments