Skip to content

Commit

Permalink
Release preparation (#5)
Browse files Browse the repository at this point in the history
* Update module name

* Added versioning and release target
  • Loading branch information
jason-fugue authored Mar 23, 2020
1 parent f8df01b commit c22b3ce
Show file tree
Hide file tree
Showing 42 changed files with 84 additions and 56 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
zim
zim-*
.mypy_cache/
.vscode
local-config.mk
cfn_deploy.yaml
signer.zip
auth.zip
samconfig.toml
venv
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ BINARY = zim
INSTALLED_BINARY = /usr/local/bin/$(BINARY)
SOURCE = $(wildcard *.go) $(wildcard */*.go) $(wildcard cloud/*/*.go)
GO = GO111MODULE=on go
VERSION = $(shell cat VERSION)
GITCOMMIT = $(shell git rev-parse --short HEAD 2> /dev/null || true)
define LDFLAGS
-X \"github.com/fugue/zim/cmd.Version=$(VERSION)\" \
-X \"github.com/fugue/zim/cmd.GitCommit=$(GITCOMMIT)\"
endef
CLI_BUILD = $(GO) build -ldflags="$(LDFLAGS)"

# Variables relating to the Zim CloudFormation stack
STACK_NAME ?= zim
Expand All @@ -21,7 +28,15 @@ API_URL = $(shell aws cloudformation describe-stacks \
--output text)

$(BINARY): $(SOURCE)
$(GO) build -v -o $(BINARY)
$(CLI_BUILD) -v -o $@

$(BINARY)-linux-amd64: $(SOURCE)
GOOS=linux GOARCH=amd64 $(CLI_BUILD) -o $@

$(BINARY)-darwin-amd64: $(SOURCE)
GOOS=darwin GOARCH=amd64 $(CLI_BUILD) -o $@

release: $(BINARY)-linux-amd64 $(BINARY)-darwin-amd64

.PHONY: install
install: $(INSTALLED_BINARY)
Expand Down Expand Up @@ -59,7 +74,7 @@ deploy: stack
clean:
rm -f cmp/cmp
rm -f coverage.out
rm -f $(BINARY)
rm -f $(BINARY) $(BINARY)-linux-amd64 $(BINARY)-darwin-amd64
rm -f $(SIGNER_DIST) $(AUTH_DIST)

.PHONY: test
Expand Down
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
4 changes: 2 additions & 2 deletions cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"path/filepath"
"sort"

"github.com/LuminalHQ/zim/project"
"github.com/LuminalHQ/zim/store"
"github.com/fugue/zim/project"
"github.com/fugue/zim/store"
)

const WriteOnly = "WRITE_ONLY"
Expand Down
4 changes: 2 additions & 2 deletions cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"path"
"testing"

"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/project"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
4 changes: 2 additions & 2 deletions cloud/cfn/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
cf "github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/LuminalHQ/zim/cache"
"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/cache"
"github.com/fugue/zim/project"
)

// CloudFormationError is a simple error type
Expand Down
2 changes: 1 addition & 1 deletion cloudformation/cloudformation.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/awslabs/goformation"
"github.com/awslabs/goformation/intrinsics"
"github.com/LuminalHQ/zim/graph"
"github.com/fugue/zim/graph"
)

// DiscoverDependencies returns a Graph representing dependencies between
Expand Down
2 changes: 1 addition & 1 deletion cmd/addToken.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"strings"

"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/project"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/dynamodb"
"github.com/aws/aws-sdk-go/service/dynamodb/dynamodbattribute"
Expand Down
4 changes: 2 additions & 2 deletions cmd/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path"
"path/filepath"

"github.com/LuminalHQ/zim/git"
"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/git"
"github.com/fugue/zim/project"
"github.com/spf13/viper"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/listComponents.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/LuminalHQ/zim/format"
"github.com/fugue/zim/format"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/listEnv.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/LuminalHQ/zim/format"
"github.com/fugue/zim/format"
"github.com/fatih/structs"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/listInputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/LuminalHQ/zim/format"
"github.com/fugue/zim/format"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/listOutputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/LuminalHQ/zim/format"
"github.com/fugue/zim/format"
"github.com/fatih/color"
"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/listRules.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cmd
import (
"fmt"

"github.com/LuminalHQ/zim/format"
"github.com/fugue/zim/format"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 4 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"fmt"
"os"

"github.com/spf13/cobra"
Expand All @@ -9,8 +10,9 @@ import (

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "zim",
Short: "The caching build tool",
Use: "zim",
Short: "The caching build tool",
Version: fmt.Sprintf("%s, build %s", Version, GitCommit),
}

// Execute adds all child commands to the root command and sets flags appropriately.
Expand Down
8 changes: 4 additions & 4 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"path/filepath"
"time"

"github.com/LuminalHQ/zim/cache"
"github.com/LuminalHQ/zim/project"
"github.com/LuminalHQ/zim/sched"
"github.com/LuminalHQ/zim/store"
"github.com/fugue/zim/cache"
"github.com/fugue/zim/project"
"github.com/fugue/zim/sched"
"github.com/fugue/zim/store"
"github.com/fatih/color"
"github.com/spf13/cobra"
"github.com/spf13/viper"
Expand Down
4 changes: 2 additions & 2 deletions cmd/showKey.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"fmt"
"strings"

"github.com/LuminalHQ/zim/cache"
"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/cache"
"github.com/fugue/zim/project"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
Expand Down
8 changes: 8 additions & 0 deletions cmd/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package cmd

// Default build-time variables.
// These values are overridden via ldflags
var (
Version = "unknown-version"
GitCommit = "unknown-commit"
)
2 changes: 1 addition & 1 deletion cmp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"sort"
"strings"

"github.com/LuminalHQ/zim/zip"
"github.com/fugue/zim/zip"
)

func tmpDir() string {
Expand Down
4 changes: 2 additions & 2 deletions git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"path/filepath"
"strings"

"github.com/LuminalHQ/zim/store"
"github.com/LuminalHQ/zim/zip"
"github.com/fugue/zim/store"
"github.com/fugue/zim/zip"
)

// CreateArchive creates a Git archive at the given path
Expand Down
2 changes: 1 addition & 1 deletion git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"testing"

"github.com/LuminalHQ/zim/zip"
"github.com/fugue/zim/zip"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/LuminalHQ/zim
module github.com/fugue/zim

go 1.12

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
//go:generate mockgen -source=project/runner.go -package project -destination project/runner_mock.go
//go:generate mockgen -source=project/exec.go -package project -destination project/exec_mock.go

import "github.com/LuminalHQ/zim/cmd"
import "github.com/fugue/zim/cmd"

func main() {
cmd.Execute()
Expand Down
2 changes: 1 addition & 1 deletion project/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path"
"path/filepath"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
"github.com/hashicorp/go-multierror"
)

Expand Down
2 changes: 1 addition & 1 deletion project/component_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/stretchr/testify/require"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
)

func TestNewComponentError(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion project/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"strings"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
)

var ignoreDirs map[string]bool
Expand Down
2 changes: 1 addition & 1 deletion project/fargate.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/aws/aws-sdk-go/service/sqs/sqsiface"
"github.com/LuminalHQ/zim/queue"
"github.com/fugue/zim/queue"
)

// FargateRunner runs a rule on a remote container
Expand Down
2 changes: 1 addition & 1 deletion project/graph.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package project

import (
"github.com/LuminalHQ/zim/graph"
"github.com/fugue/zim/graph"
)

// GraphFromRules builds a dependency graph originating from the specified
Expand Down
2 changes: 1 addition & 1 deletion project/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"time"

"github.com/LuminalHQ/zim/store"
"github.com/fugue/zim/store"
)

// BufferedOutput is middleware that shows rule stdout and stderr
Expand Down
2 changes: 1 addition & 1 deletion project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"strings"
"sync"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
"github.com/hashicorp/go-multierror"
)

Expand Down
2 changes: 1 addition & 1 deletion project/project_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"reflect"
"testing"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
)

func testDir(parent ...string) string {
Expand Down
2 changes: 1 addition & 1 deletion project/rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path"
"strings"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
)

// Dependency on another Component (a Rule or an Export)
Expand Down
2 changes: 1 addition & 1 deletion project/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"path"
"testing"

"github.com/LuminalHQ/zim/definitions"
"github.com/fugue/zim/definitions"
gomock "github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion project/term.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

tm "github.com/buger/goterm"
"github.com/LuminalHQ/zim/queue"
"github.com/fugue/zim/queue"
"github.com/fatih/color"
)

Expand Down
2 changes: 1 addition & 1 deletion sched/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sched
import (
"context"

"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/project"
)

// Options used to configure the Scheduler
Expand Down
4 changes: 2 additions & 2 deletions sched/sched.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"sort"
"time"

"github.com/LuminalHQ/zim/graph"
"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/graph"
"github.com/fugue/zim/project"
"github.com/hashicorp/go-multierror"
)

Expand Down
4 changes: 2 additions & 2 deletions sched/sched_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"path"
"testing"

"github.com/LuminalHQ/zim/definitions"
"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/definitions"
"github.com/fugue/zim/project"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion sched/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sched
import (
"context"

"github.com/LuminalHQ/zim/project"
"github.com/fugue/zim/project"
)

// workerResult contains the results of running a rule
Expand Down
Loading

0 comments on commit c22b3ce

Please sign in to comment.