Skip to content

Commit 6f26d21

Browse files
authored
Merge branch 'main' into feature/num-36
2 parents 3f6af9f + f883fec commit 6f26d21

18 files changed

+423
-265
lines changed

.devcontainer/Dockerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/go/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Go version: 1, 1.16, 1.17
4+
ARG VARIANT="1.17"
5+
FROM mcr.microsoft.com/vscode/devcontainers/go:0-${VARIANT}
6+
7+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
8+
ARG NODE_VERSION="none"
9+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
10+
11+
# [Optional] Uncomment this section to install additional OS packages.
12+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
13+
# && apt-get -y install --no-install-recommends <your-package-list-here>
14+
15+
# [Optional] Uncomment the next line to use go get to install anything else you need
16+
# RUN go get -x <your-dependency-or-tool>
17+
18+
# [Optional] Uncomment this line to install global node packages.
19+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/go
3+
{
4+
"name": "Go",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update the VARIANT arg to pick a version of Go: 1, 1.16, 1.17
9+
"VARIANT": "1.16",
10+
// Options
11+
"NODE_VERSION": "none"
12+
}
13+
},
14+
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
15+
16+
// Set *default* container specific settings.json values on container create.
17+
"settings": {
18+
"go.toolsManagement.checkForUpdates": "local",
19+
"go.useLanguageServer": true,
20+
"go.gopath": "/go",
21+
"go.goroot": "/usr/local/go"
22+
},
23+
24+
// Add the IDs of extensions you want installed when the container is created.
25+
"extensions": [
26+
"golang.Go"
27+
],
28+
29+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
30+
// "forwardPorts": [],
31+
32+
// Use 'postCreateCommand' to run commands after the container is created.
33+
"postCreateCommand": "go mod download",
34+
35+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
36+
"remoteUser": "vscode"
37+
}

.github/.goreleaser.darwin.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/.goreleaser.default.yml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
project_name: numary
2+
env:
3+
- GO111MODULE=on
4+
- GOPROXY=https://proxy.golang.org
5+
before:
6+
hooks:
7+
- go mod download
8+
9+
builds:
10+
- binary: numary
11+
id: numary_linux
12+
ldflags:
13+
- -X github.com/numary/ledger/cmd.BuildDate={{ .Date }}
14+
- -X github.com/numary/ledger/cmd.Version={{ .Version }}
15+
- -X github.com/numary/ledger/cmd.Commit={{ .ShortCommit }}
16+
env:
17+
- CGO_ENABLED=1
18+
goos:
19+
- linux
20+
goarch:
21+
- amd64
22+
- binary: numary
23+
id: numary_darwin
24+
ldflags:
25+
- -X github.com/numary/ledger/cmd.BuildDate={{ .Date }}
26+
- -X github.com/numary/ledger/cmd.Version={{ .Version }}
27+
- -X github.com/numary/ledger/cmd.Commit={{ .ShortCommit }}
28+
- -s
29+
env:
30+
- CGO_ENABLED=1
31+
- CC=/home/runner/work/osxcross/target/bin/o64-clang
32+
- CXX=/home/runner/work/osxcross/target/bin/o64-clang++
33+
goos:
34+
- darwin
35+
goarch:
36+
- amd64
37+
- arm64
38+
39+
archives:
40+
- id: "numary"
41+
builds:
42+
- numary_linux
43+
- numary_darwin
44+
format: tar.gz
45+
format_overrides:
46+
- goos: windows
47+
format: zip
48+
name_template: "{{.ProjectName}}_{{.Version}}_{{.Os}}-{{.Arch}}"
49+
replacements:
50+
amd64: 64bit
51+
386: 32bit
52+
arm: ARM
53+
arm64: ARM64
54+
darwin: macOS
55+
linux: Linux
56+
windows: Windows
57+
58+
59+
checksum:
60+
name_template: 'checksums_linux.txt'
61+
62+
snapshot:
63+
name_template: "{{ .Tag }}"
64+
65+
changelog:
66+
sort: asc
67+
filters:
68+
exclude:
69+
- '^docs:'
70+
- '^test:'
71+
- '^spec:'
72+
73+
dockers:
74+
- image_templates: ["ghcr.io/numary/ledger:{{ .Version }}-amd64"]
75+
dockerfile: Dockerfile
76+
use: buildx
77+
build_flag_templates:
78+
- --platform=linux/amd64
79+
- --label=org.opencontainers.image.title={{ .ProjectName }}
80+
- --label=org.opencontainers.image.description={{ .ProjectName }}
81+
- --label=org.opencontainers.image.url=https://github.com/numary/ledger
82+
- --label=org.opencontainers.image.source=https://github.com/numary/ledger
83+
- --label=org.opencontainers.image.version={{ .Version }}
84+
- --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
85+
- --label=org.opencontainers.image.revision={{ .FullCommit }}
86+
docker_manifests:
87+
- name_template: ghcr.io/numary/ledger:{{ .Version }}
88+
image_templates:
89+
- ghcr.io/numary/ledger:{{ .Version }}-amd64
90+
- name_template: ghcr.io/numary/ledger:latest
91+
image_templates:
92+
- ghcr.io/numary/ledger:{{ .Version }}-amd64
93+
94+
brews:
95+
- tap:
96+
owner: numary
97+
name: homebrew-tap
98+
name: numary
99+
folder: Formula
100+
homepage: https://numary.com
101+
skip_upload: false
102+
test: |
103+
system "#{bin}/numary version"
104+
install: |
105+
bin.install "numary"

.github/.goreleaser.linux.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/.goreleaser.windows.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
builds:
2+
- goos:
3+
- windows
4+
goarch:
5+
- amd64
6+
binary: numary
7+
env:
8+
- CGO_ENABLED=1
9+
ldflags:
10+
- -X github.com/numary/ledger/cmd.BuildDate={{ .Date }}
11+
- -X github.com/numary/ledger/cmd.Version={{ .Version }}
12+
- -X github.com/numary/ledger/cmd.Commit={{ .ShortCommit }}
13+
14+
checksum:
15+
name_template: 'checksums_windows.txt'
16+
17+
snapshot:
18+
name_template: "{{ .Tag }}"
19+
20+
changelog:
21+
sort: asc
22+
filters:
23+
exclude:
24+
- '^docs:'
25+
- '^test:'
26+
- '^spec:'

.github/deploy_ecs_service.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/codeql.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
schedule:
9+
- cron: '35 21 * * 5'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
language: [ 'go' ]
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v2
26+
- name: Initialize CodeQL
27+
uses: github/codeql-action/init@v1
28+
with:
29+
languages: ${{ matrix.language }}
30+
- name: Autobuild
31+
uses: github/codeql-action/autobuild@v1
32+
- name: Perform CodeQL Analysis
33+
uses: github/codeql-action/analyze@v1

0 commit comments

Comments
 (0)