Skip to content

Commit

Permalink
switch up homebrew formula, add version call
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Jackson committed May 23, 2023
1 parent 8e466b8 commit 1809c03
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,14 @@ brews:
tap:
owner: scottmmjackson
name: homebrew-sj
branch: main
pull_request:
enabled: true
base: main
git:
url: 'ssh://[email protected]:scottmmjackson/bb2todotxt.git'
private_key: '{{ .Env.BREW_KEY }}'
url_template: 'https://github.com/scottmmjackson/bb2todotxt/releases/download/{{ .Tag }}/{{ .ArtifactName }}"'
commit_author:
name: goreleaserbot
email: [email protected]
folder: Formula
homepage: "https://github.com/scottmmjackson/bb2todotxt"
description: Converts pull request tasks from bitbucket to todo txt tasks
license: BSD 3.0
test: |
system "#{bin}/bb2todotxt -v"
checksum:
name_template: 'checksums.txt'
Expand Down
7 changes: 7 additions & 0 deletions bb2todotxt.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,25 @@ import (
"os"
)

const VERSION = "v0.0.3"

type bitbucketConfig struct {
Username string `json:username`
Password string `json:password`
}

func commandLine() (*bitbucketConfig, string, string, int, error) {
var bitbucketConfigMap *bitbucketConfig
version := flag.Bool("v", false, "print version and quit")
slug := flag.String("slug", "", "repo slug")
owner := flag.String("owner", "", "repo owner")
id := flag.Int("id", 0, "pull request id")
bitbucketConfigFile := flag.String("config", "", "Bitbucket config file")
flag.Parse()
if *version {
fmt.Println(VERSION)
os.Exit(0)
}
if *bitbucketConfigFile == "" {
return bitbucketConfigMap, "", "", 0, errors.New("Required flags not provided.")
}
Expand Down

0 comments on commit 1809c03

Please sign in to comment.