From cce9f1ed7af27ecf2302e9cbf7541709a45192a9 Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:01:14 +0300 Subject: [PATCH 01/21] Typo fixing --- evaluator/builtins.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evaluator/builtins.go b/evaluator/builtins.go index 806689d..0cc4dfd 100644 --- a/evaluator/builtins.go +++ b/evaluator/builtins.go @@ -74,7 +74,7 @@ var builtins = map[string]*object.Builtin{ "aina": { Fn: func(args ...object.Object) object.Object { if len(args) != 1 { - return newError("Samahani, tunahitaji Hoja 1, wewe umeweka %d", len(args)) + return newError("Samahani, tunahitaji hoja 1, wewe umeweka %d", len(args)) } return &object.String{Value: string(args[0].Type())} From 844c6b3e1d36d0c59bf799bc78bd5c82cddabbea Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:09:20 +0300 Subject: [PATCH 02/21] Translation fix --- evaluator/property.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evaluator/property.go b/evaluator/property.go index b68199f..fad7bf3 100644 --- a/evaluator/property.go +++ b/evaluator/property.go @@ -58,6 +58,7 @@ func evalPropertyAssignment(name *ast.PropertyExpression, val object.Object, env obj.Env.Set(prop, val) return NULL default: - return newError("Imeshindikana ku assign kwenye package %s", left.Type()) + return newError("Imeshindikana kuweka kwenye pakiti %s", left.Type()) + // Alternative: return newError("Imeshindikana kukabidhi kwenye kifurushi %s", left.Type()) } } From 51dbee7d1aa941a166402a5ac5477fa4c16d1d2c Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:10:34 +0300 Subject: [PATCH 03/21] typo fix --- evaluator/prefix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/evaluator/prefix.go b/evaluator/prefix.go index 4bb9f56..5efb52d 100644 --- a/evaluator/prefix.go +++ b/evaluator/prefix.go @@ -12,7 +12,7 @@ func evalMinusPrefixOperatorExpression(right object.Object, line int) object.Obj return &object.Float{Value: -obj.Value} default: - return newError("Mstari %d: Operesheni Haielweki: -%s", line, right.Type()) + return newError("Mstari %d: Operesheni haieleweki: -%s", line, right.Type()) } } func evalPlusPrefixOperatorExpression(right object.Object, line int) object.Object { @@ -25,7 +25,7 @@ func evalPlusPrefixOperatorExpression(right object.Object, line int) object.Obje return &object.Float{Value: obj.Value} default: - return newError("Mstari %d: Operesheni Haielweki: +%s", line, right.Type()) + return newError("Mstari %d: Operesheni haieleweki: +%s", line, right.Type()) } } From efc6ff157e8ba90cc1e88635285949e9ffb52724 Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:14:31 +0300 Subject: [PATCH 04/21] translation --- evaluator/index.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evaluator/index.go b/evaluator/index.go index 07945f0..e5a182f 100644 --- a/evaluator/index.go +++ b/evaluator/index.go @@ -32,7 +32,7 @@ func evalDictIndexExpression(dict, index object.Object, line int) object.Object key, ok := index.(object.Hashable) if !ok { - return newError("Mstari %d: Samahani, %s haitumiki kama key", line, index.Type()) + return newError("Mstari %d: Samahani, %s haitumiki kama ufunguo", line, index.Type()) } pair, ok := dictObject.Pairs[key.HashKey()] From 56ecd1f4ce3086900aa32fdbdbcc7f8d5fb5e5b7 Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:21:09 +0300 Subject: [PATCH 05/21] translation --- evaluator/evaluator.go | 8 ++++---- evaluator/import.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/evaluator/evaluator.go b/evaluator/evaluator.go index 70f2db9..758f4dd 100644 --- a/evaluator/evaluator.go +++ b/evaluator/evaluator.go @@ -180,7 +180,7 @@ func Eval(node ast.Node, env *object.Environment) object.Object { } array.Elements[idx.Value] = value } else { - return newError("Hauwezi kufanya opereshen hii na %#v", index) + return newError("Hauwezi kufanya operesheni hii na %#v", index) } } else if hash, ok := obj.(*object.Dict); ok { key := Eval(ie.Index, env) @@ -191,13 +191,13 @@ func Eval(node ast.Node, env *object.Environment) object.Object { hashed := hashKey.HashKey() hash.Pairs[hashed] = object.DictPair{Key: key, Value: value} } else { - return newError("Hauwezi kufanya opereshen hii na %T", key) + return newError("Hauwezi kufanya operesheni hii na %T", key) } } else { - return newError("%T haifanyi operation hii", obj) + return newError("%T haifanyi operesheni hii", obj) } } else { - return newError("Tumia neno kama variable, sio %T", left) + return newError("Tumia neno kama kibadala, sio %T", left) } } diff --git a/evaluator/import.go b/evaluator/import.go index 0375a3c..130f20c 100644 --- a/evaluator/import.go +++ b/evaluator/import.go @@ -31,7 +31,7 @@ func evalImportFile(name string, ident *ast.Identifier, env *object.Environment) addSearchPath("") filename := findFile(name) if filename == "" { - return newError("Module %s haipo", name) + return newError("Moduli %s haipo", name) } var scope *object.Environment scope, err := evaluateFile(filename, env) @@ -70,7 +70,7 @@ func evaluateFile(file string, env *object.Environment) (*object.Environment, ob p := parser.New(l) program := p.ParseProgram() if len(p.Errors()) != 0 { - return nil, &object.Error{Message: fmt.Sprintf("Pakeji %s ina errors zifuatozo:\n%s", file, strings.Join(p.Errors(), "\n"))} + return nil, &object.Error{Message: fmt.Sprintf("Pakeji %s ina makosa yafuatayo:\n%s", file, strings.Join(p.Errors(), "\n"))} } scope := object.NewEnvironment() From 26e997974931dd719acb6c20b28f7ba445b2af9e Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:29:05 +0300 Subject: [PATCH 06/21] fix --- evaluator/property.go | 1 - 1 file changed, 1 deletion(-) diff --git a/evaluator/property.go b/evaluator/property.go index fad7bf3..13ea8be 100644 --- a/evaluator/property.go +++ b/evaluator/property.go @@ -59,6 +59,5 @@ func evalPropertyAssignment(name *ast.PropertyExpression, val object.Object, env return NULL default: return newError("Imeshindikana kuweka kwenye pakiti %s", left.Type()) - // Alternative: return newError("Imeshindikana kukabidhi kwenye kifurushi %s", left.Type()) } } From 38c907a12c43fa823df018db00234967703752f8 Mon Sep 17 00:00:00 2001 From: "Karim M. Nyumba" <96383368+karimnyumba@users.noreply.github.com> Date: Thu, 12 Oct 2023 23:44:11 +0300 Subject: [PATCH 07/21] test fix --- evaluator/evaluator_test.go | 12 ++++++------ evaluator/prefix.go | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/evaluator/evaluator_test.go b/evaluator/evaluator_test.go index c4a8a97..2142a22 100644 --- a/evaluator/evaluator_test.go +++ b/evaluator/evaluator_test.go @@ -214,19 +214,19 @@ func TestErrorHandling(t *testing.T) { }, { "-kweli", - "Mstari 1: Operesheni Haielweki: -BOOLEAN", + "Mstari 1: Operesheni Haieleweki: -BOOLEAN", }, { "kweli + sikweli", - "Mstari 1: Operesheni Haielweki: BOOLEAN + BOOLEAN", + "Mstari 1: Operesheni Haieleweki: BOOLEAN + BOOLEAN", }, { "5; kweli + sikweli; 5", - "Mstari 1: Operesheni Haielweki: BOOLEAN + BOOLEAN", + "Mstari 1: Operesheni Haieleweki: BOOLEAN + BOOLEAN", }, { "kama (10 > 1) { kweli + sikweli;}", - "Mstari 1: Operesheni Haielweki: BOOLEAN + BOOLEAN", + "Mstari 1: Operesheni Haieleweki: BOOLEAN + BOOLEAN", }, { ` @@ -238,7 +238,7 @@ kama (10 > 1) { rudisha 1; } `, - "Mstari 4: Operesheni Haielweki: BOOLEAN + BOOLEAN", + "Mstari 4: Operesheni Haieleweki: BOOLEAN + BOOLEAN", }, { "bangi", @@ -246,7 +246,7 @@ kama (10 > 1) { }, { `"Habari" - "Habari"`, - "Mstari 1: Operesheni Haielweki: NENO - NENO", + "Mstari 1: Operesheni Haieleweki: NENO - NENO", }, { `{"jina": "Avi"}[unda(x) {x}];`, diff --git a/evaluator/prefix.go b/evaluator/prefix.go index 5efb52d..3038006 100644 --- a/evaluator/prefix.go +++ b/evaluator/prefix.go @@ -12,7 +12,7 @@ func evalMinusPrefixOperatorExpression(right object.Object, line int) object.Obj return &object.Float{Value: -obj.Value} default: - return newError("Mstari %d: Operesheni haieleweki: -%s", line, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: -%s", line, right.Type()) } } func evalPlusPrefixOperatorExpression(right object.Object, line int) object.Object { @@ -25,7 +25,7 @@ func evalPlusPrefixOperatorExpression(right object.Object, line int) object.Obje return &object.Float{Value: obj.Value} default: - return newError("Mstari %d: Operesheni haieleweki: +%s", line, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: +%s", line, right.Type()) } } @@ -38,6 +38,6 @@ func evalPrefixExpression(operator string, right object.Object, line int) object case "+": return evalPlusPrefixOperatorExpression(right, line) default: - return newError("Mstari %d: Operesheni haieleweki: %s%s", line, operator, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: %s%s", line, operator, right.Type()) } } From 9066ba614cdabc86f802019d7f7349db0c30e872 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 21:51:12 +0300 Subject: [PATCH 08/21] fix tests --- evaluator/evaluator_test.go | 2 +- evaluator/infix.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/evaluator/evaluator_test.go b/evaluator/evaluator_test.go index 2142a22..ad9e925 100644 --- a/evaluator/evaluator_test.go +++ b/evaluator/evaluator_test.go @@ -250,7 +250,7 @@ kama (10 > 1) { }, { `{"jina": "Avi"}[unda(x) {x}];`, - "Mstari 1: Samahani, UNDO (FUNCTION) haitumiki kama key", + "Mstari 1: Samahani, UNDO (FUNCTION) haitumiki kama ufunguo", }, } diff --git a/evaluator/infix.go b/evaluator/infix.go index 33fa484..e17645a 100644 --- a/evaluator/infix.go +++ b/evaluator/infix.go @@ -90,7 +90,7 @@ func evalInfixExpression(operator string, left, right object.Object, line int) o line, left.Type(), operator, right.Type()) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -132,7 +132,7 @@ func evalFloatIntegerInfixExpression(operator string, left, right object.Object, case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } @@ -156,7 +156,7 @@ func evalStringInfixExpression(operator string, left, right object.Object, line case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", line, left.Type(), operator, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -170,7 +170,7 @@ func evalBooleanInfixExpression(operator string, left, right object.Object, line case "||": return nativeBoolToBooleanObject(leftVal || rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", line, left.Type(), operator, right.Type()) + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -202,7 +202,7 @@ func evalFloatInfixExpression(operator string, left, right object.Object, line i case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } @@ -242,7 +242,7 @@ func evalIntegerInfixExpression(operator string, left, right object.Object, line case "!=": return nativeBoolToBooleanObject(leftVal != rightVal) default: - return newError("Mstari %d: Operesheni Haielweki: %s %s %s", + return newError("Mstari %d: Operesheni Haieleweki: %s %s %s", line, left.Type(), operator, right.Type()) } } From 9b438d52de51d5eddc5c22d48c9ee3beed32391e Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 22:10:35 +0300 Subject: [PATCH 09/21] test releasing --- .github/workflows/tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fa3aa02..14d7469 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,23 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v3 with: go-version: 1.18 + id: go - name: Test run: go mod tidy && make test + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@master + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} From 96ad29422d18f68553166ab78e5bd713c209e390 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 22:18:56 +0300 Subject: [PATCH 10/21] add comment to tokens --- token/token.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/token/token.go b/token/token.go index fff5b1d..0608580 100644 --- a/token/token.go +++ b/token/token.go @@ -1,3 +1,5 @@ +// This is where we define our tokens + package token type TokenType string From a45eb2a317de9b6a398ca1a5e7718ebc0d4a1b12 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 22:27:23 +0300 Subject: [PATCH 11/21] fix ci will this work? --- .github/workflows/tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 14d7469..b749c10 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,17 +16,18 @@ jobs: - name: Set up Go uses: actions/setup-go@v3 with: - go-version: 1.18 + go-version: 1.21 id: go - name: Test run: go mod tidy && make test - name: Run GoReleaser - uses: goreleaser/goreleaser-action@master + uses: goreleaser/goreleaser-action@v5 with: + distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} From c2c991f1c0962a45fdf31d548ba3cda6b085fa01 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 23:09:34 +0300 Subject: [PATCH 12/21] remove dev branch ci --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b749c10..22b5ecd 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: Go on: push: - branches: [ main, dev ] + branches: [ main ] jobs: From 2c3e4ac2632a396e440ee14299c19a3279798638 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 23:13:17 +0300 Subject: [PATCH 13/21] remove build from tests --- .github/workflows/tests.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 22b5ecd..7f6c282 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: Go on: push: - branches: [ main ] + branches: [ main, dev ] jobs: @@ -10,24 +10,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v3 with: go-version: 1.21 - id: go - name: Test run: go mod tidy && make test - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v5 - with: - distribution: goreleaser - version: latest - args: release --clean - env: - GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} From 225507097876417b3177521927a62c30b26844d2 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 23:14:06 +0300 Subject: [PATCH 14/21] add separate for releases --- .github/workflows/build.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3c26f7f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,32 @@ +name: Go + +on: + push: + tags: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.21 + id: go + + - name: Test + run: go mod tidy && make test + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v5 + with: + distribution: goreleaser + version: latest + args: release --clean + env: + GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} From c6f0c2f71005c6682dd423ccc99cd36240517403 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 23:41:50 +0300 Subject: [PATCH 15/21] update gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 2631fb3..2443257 100644 --- a/.gitignore +++ b/.gitignore @@ -52,7 +52,10 @@ nuru Notes.md tutorials/en/* config.json +*local* # For Nuru executables /nuru /Nuru + +dist/ From 5c270d16dc043a26edb15e8f1ea270cbccd17301 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Sun, 15 Oct 2023 23:42:39 +0300 Subject: [PATCH 16/21] add goreleaser cofig --- .goreleaser.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .goreleaser.yaml diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..62d214b --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,45 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com + +# The lines bellow are called `modelines`. See `:help modeline` +# Feel free to remove those if you don't want/need to use them. +# yaml-language-server: $schema=https://goreleaser.com/static/schema.json +# vim: set ts=2 sw=2 tw=0 fo=cnqoj + +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... + +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin + - android + +archives: + - format: tar.gz + # this name template makes the OS and Arch compatible with the results of `uname`. + name_template: >- + {{ .ProjectName }}_ + {{- title .Os }}_ + {{- if eq .Arch "amd64" }}x86_64 + {{- else if eq .Arch "386" }}i386 + {{- else }}{{ .Arch }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }} + # use zip for windows archives + format_overrides: + - goos: windows + format: zip + +changelog: + sort: asc + filters: + exclude: + - "^docs:" + - "^test:" From 4ae7531a0c2149a3a893d00b1031e4af8ed32a55 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Mon, 16 Oct 2023 00:01:48 +0300 Subject: [PATCH 17/21] ignore 386 for android --- .goreleaser.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 62d214b..7c354db 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -21,6 +21,9 @@ builds: - windows - darwin - android + ignore: + - goos: android + goarch: 386 archives: - format: tar.gz From cc33f3b5cec14dcbf9da0a7ab55ebe783fadc899 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Mon, 16 Oct 2023 00:38:55 +0300 Subject: [PATCH 18/21] use nuru --- .goreleaser.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 7c354db..c00131d 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -29,7 +29,7 @@ archives: - format: tar.gz # this name template makes the OS and Arch compatible with the results of `uname`. name_template: >- - {{ .ProjectName }}_ + nuru_ {{- title .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 From c046302843cf25d16b4af2f162b97512ccf1b1cb Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Mon, 16 Oct 2023 00:54:50 +0300 Subject: [PATCH 19/21] add deb release? --- .goreleaser.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c00131d..8ef1a39 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -46,3 +46,7 @@ changelog: exclude: - "^docs:" - "^test:" + +nfpms: + - file_name_template: nuru + maintainer: AvicennaJr \ No newline at end of file From 4ca9cdeeaa6a1f27a852aa09710a2893a1e1ed04 Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Mon, 16 Oct 2023 01:10:23 +0300 Subject: [PATCH 20/21] add output formats for nfpms --- .goreleaser.yaml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8ef1a39..d5fccfd 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -48,5 +48,11 @@ changelog: - "^test:" nfpms: - - file_name_template: nuru - maintainer: AvicennaJr \ No newline at end of file + - name: nuru + maintainer: AvicennaJr + arch: amd64 + platform: linux + section: default + priority: extra + homepage: "https://nuruprogramming.org" + description: "Nuru is a programming language built from the ground up" \ No newline at end of file From 7732a4b2796e4ef7a0a2328c13b28301a2cee18a Mon Sep 17 00:00:00 2001 From: AvicennaJr Date: Mon, 16 Oct 2023 01:36:34 +0300 Subject: [PATCH 21/21] figured it out alx --- .goreleaser.yaml | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index d5fccfd..dba4b11 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,16 +1,7 @@ -# This is an example .goreleaser.yml file with some sensible defaults. -# Make sure to check the documentation at https://goreleaser.com - -# The lines bellow are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/need to use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj - +project_name: nuru before: hooks: - # You may remove this if you don't use go modules. - go mod tidy - # you may remove this if you don't need go generate - go generate ./... builds: @@ -21,13 +12,14 @@ builds: - windows - darwin - android + ldflags: + - '-s -w' ignore: - goos: android goarch: 386 archives: - format: tar.gz - # this name template makes the OS and Arch compatible with the results of `uname`. name_template: >- nuru_ {{- title .Os }}_ @@ -35,7 +27,6 @@ archives: {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }} - # use zip for windows archives format_overrides: - goos: windows format: zip @@ -48,11 +39,9 @@ changelog: - "^test:" nfpms: - - name: nuru - maintainer: AvicennaJr - arch: amd64 - platform: linux - section: default - priority: extra + - maintainer: "AvicennaJr" homepage: "https://nuruprogramming.org" - description: "Nuru is a programming language built from the ground up" \ No newline at end of file + description: "Nuru is a programming language built from the ground up" + formats: + - deb + file_name_template: "{{ .ProjectName }}.{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}" \ No newline at end of file