Skip to content
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from korosuke613/refactor
Browse files Browse the repository at this point in the history
ci: add +docker
  • Loading branch information
korosuke613 authored Mar 21, 2021
2 parents 661129b + 31d7ad6 commit 5136338
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,7 @@ jobs:
- run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.5.7/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Earthly version
run: earthly --version
- name: Run lint
- name: +build
run: earthly --ci --use-inline-cache --push +build
- name: +docker
run: earthly --ci --use-inline-cache --push +docker
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
builds:
- env:
- CGO_ENABLED=0
main: ./src/main.go
main: ./main.go
goos:
- linux
- windows
Expand Down
7 changes: 5 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

FROM golang:1.16
WORKDIR /work
ENV GO111MODULE=on

src:
COPY ./src /work/src
COPY ./cmd ./cmd
COPY ./lib ./lib
COPY ./main.go ./
COPY go.mod go.sum ./

deps:
Expand All @@ -23,7 +26,7 @@ lint:
build:
FROM +deps

RUN go build -o build/tempura ./src/main.go
RUN go build -o build/tempura ./main.go
SAVE ARTIFACT build/tempura /tempura AS LOCAL build/tempura

goreleaser-setup:
Expand Down
6 changes: 3 additions & 3 deletions src/cmd/root.go → cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"github.com/korosuke613/tempura/src/lib"
"github.com/korosuke613/tempura/lib"
"github.com/spf13/cobra"
"os"
)
Expand Down Expand Up @@ -31,8 +31,8 @@ func newRootCmd() *cobra.Command {

cmd := &cobra.Command{
Use: "tempura",
Short: "tempura is a generator that fills in templates.",
Long: `A Fast and Flexible Template Fill Generator built with love by korosuke613 in Go.`,
Short: "tempura is a Tool that fills in templates.",
Long: `A Fast and Flexible Template Fill Tool built with love by korosuke613 in Go.`,
RunE: func(_ *cobra.Command, args []string) error {
if showVersion {
printVersion()
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main.go → main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/korosuke613/tempura/src/cmd"
"github.com/korosuke613/tempura/cmd"
)

func main() {
Expand Down

0 comments on commit 5136338

Please sign in to comment.