github.com/goplus/gop@v1.2.6/.goreleaser.yaml (about)

     1  # The lines below are called `modelines`. See `:help modeline`
     2  # Feel free to remove those if you don't want/need to use them.
     3  # yaml-language-server: $schema=https://goreleaser.com/static/schema.json
     4  # vim: set ts=2 sw=2 tw=0 fo=cnqoj
     5  
     6  version: 1
     7  dist: ".dist"
     8  
     9  before:
    10    hooks:
    11      # You may remove this if you don't use go modules.
    12      - go mod tidy
    13      # you may remove this if you don't need go generate
    14      # - go generate ./...
    15  
    16  builds:
    17    - id: gop
    18      env:
    19        - CGO_ENABLED=0
    20      goos:
    21        - linux
    22        - windows
    23        - darwin
    24      main: ./cmd/gop
    25      binary: bin/gop
    26      ldflags:
    27        - -X github.com/goplus/gop/env.buildVersion=v{{.Version}}
    28        - -X github.com/goplus/gop/env.buildDate={{.Date}}
    29    - id: gopfmt
    30      env:
    31        - CGO_ENABLED=0
    32      goos:
    33        - linux
    34        - windows
    35        - darwin
    36      main: ./cmd/gopfmt
    37      binary: bin/gopfmt
    38      ldflags:
    39        - -X github.com/goplus/gop/env.buildVersion=v{{.Version}}
    40        - -X github.com/goplus/gop/env.buildDate={{.Date}}
    41  
    42  archives:
    43    - format: tar.gz
    44      # this name template makes the OS and Arch compatible with the results of `uname`.
    45      name_template: >-
    46        {{ .ProjectName }}{{.Version}}.{{ .Os }}-{{ .Arch }}
    47        {{- if .Arm }}v{{ .Arm }}{{ end }}
    48      # use zip for windows archives
    49      format_overrides:
    50        - goos: windows
    51          format: zip
    52      files:
    53        - LICENSE
    54        - "*.mod"
    55        - "*.sum"
    56        - "*.md"
    57        - "**/*.go"
    58        - "**/*.md"
    59  
    60  changelog:
    61    sort: asc
    62    filters:
    63      exclude:
    64        - "^docs:"
    65        - "^test:"
    66  
    67  dockers:
    68    - goarch: "386"
    69      image_templates:
    70        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-386
    71      use: buildx
    72      build_flag_templates:
    73        - --platform=linux/386
    74        - --build-arg=USE_GORELEASER_ARTIFACTS=1
    75      extra_files:
    76        - ./
    77    - goarch: amd64
    78      image_templates:
    79        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-amd64
    80      use: buildx
    81      build_flag_templates:
    82        - --platform=linux/amd64
    83        - --build-arg=USE_GORELEASER_ARTIFACTS=1
    84      extra_files:
    85        - ./
    86    - goarch: arm64
    87      image_templates:
    88        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-arm64
    89      use: buildx
    90      build_flag_templates:
    91        - --platform=linux/arm64
    92        - --build-arg=USE_GORELEASER_ARTIFACTS=1
    93      extra_files:
    94        - ./
    95  
    96  docker_manifests:
    97    - name_template: ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}
    98      image_templates:
    99        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-386
   100        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-amd64
   101        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-arm64
   102    - name_template: ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Major }}.{{ .Minor }}
   103      image_templates:
   104        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-386
   105        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-amd64
   106        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-arm64
   107      skip_push: auto
   108    - name_template: ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Major }}
   109      image_templates:
   110        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-386
   111        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-amd64
   112        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-arm64
   113      skip_push: auto
   114    - name_template: ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:latest
   115      image_templates:
   116        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-386
   117        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-amd64
   118        - ghcr.io/{{ envOrDefault "GITHUB_REPOSITORY" "goplus/gop" }}:{{ .Version }}-arm64
   119      skip_push: auto
   120  
   121  winget:
   122    - name: goplus
   123      homepage: "https://goplus.org/"
   124      publisher: goplus
   125      publisher_url: https://github.com/goplus/gop
   126      publisher_support_url: "https://github.com/goplus/gop/issues/new"
   127      package_identifier: goplus.gop
   128      path: "manifests/g/goplus/gop/{{.Version}}"
   129      tags:
   130        - golang
   131        - go
   132        - gop
   133        - goplus
   134        - programming
   135        - language
   136        - compiler
   137        - interpreter
   138        - data science
   139        - engineering
   140        - education
   141      short_description: The Go+ Programming Language
   142      description: |
   143        The Go+ programming language is designed for engineering, STEM education, and data science.
   144        - For engineering: working in the simplest language that can be mastered by children.
   145        - For STEM education: studying an engineering language that can be used for work in the future.
   146        - For data science: communicating with engineers in the same language.
   147      license: Apache-2.0
   148      skip_upload: auto
   149      release_notes: "{{.Changelog}}"
   150      release_notes_url: "https://github.com/{{ .Env.GITHUB_REPOSITORY_OWNER }}/gop/releases/tag/v{{.Version}}"
   151      dependencies:
   152        - package_identifier: GoLang.Go
   153          minimum_version: 1.18.0
   154      repository:
   155        owner: goplus
   156        name: winget-pkgs
   157        branch: "{{.ProjectName}}-v{{.Version}}"
   158        git:
   159          url: "git@github.com:{{ .Env.GITHUB_REPOSITORY_OWNER }}/winget-pkgs.git"
   160          private_key: "{{ .Env.WINGET_PKGS_PRIVATE_KEY }}"
   161        pull_request:
   162          enabled: true
   163          draft: true
   164          base:
   165            owner: microsoft
   166            name: winget-pkgs
   167            branch: master
   168  
   169  nfpms:
   170    - package_name: gop
   171      vendor: goplus
   172      homepage: https://goplus.org/
   173      maintainer: Li Jie <cpunion@gmail.com>
   174      license: Apache-2.0
   175      description: |
   176        The Go+ programming language is designed for engineering, STEM education, and data science.
   177        - For engineering: working in the simplest language that can be mastered by children.
   178        - For STEM education: studying an engineering language that can be used for work in the future.
   179        - For data science: communicating with engineers in the same language.
   180      formats:
   181        - "deb"
   182        - "rpm"
   183      overrides:
   184        deb:
   185          dependencies:
   186            - "golang-go (>= 1.18.0)"
   187        rpm:
   188          dependencies:
   189            - "golang-bin >= 1.18.0"
   190      file_name_template: >-
   191        {{ .ProjectName }}{{.Version}}.{{ .Os }}-{{ .Arch }}
   192        {{- if .Arm }}v{{ .Arm }}{{ end }}
   193      bindir: /usr/lib/{{ .ProjectName }}
   194      contents:
   195        # source folder
   196        - src: "CODE_OF_CONDUCT.md"
   197          dst: "/usr/lib/{{ .ProjectName }}/CODE_OF_CONDUCT.md"
   198        - src: "Dockerfile"
   199          dst: "/usr/lib/{{ .ProjectName }}/Dockerfile"
   200        - src: "LICENSE"
   201          dst: "/usr/lib/{{ .ProjectName }}/LICENSE"
   202        - src: "Makefile"
   203          dst: "/usr/lib/{{ .ProjectName }}/Makefile"
   204        - src: "README.md"
   205          dst: "/usr/lib/{{ .ProjectName }}/README.md"
   206        - src: "_gendeps.go"
   207          dst: "/usr/lib/{{ .ProjectName }}/_gendeps.go"
   208        - src: "all.bash"
   209          dst: "/usr/lib/{{ .ProjectName }}/all.bash"
   210        - src: "all.bat"
   211          dst: "/usr/lib/{{ .ProjectName }}/all.bat"
   212        - src: "ast"
   213          dst: "/usr/lib/{{ .ProjectName }}/ast"
   214        - src: "build_install_run.go"
   215          dst: "/usr/lib/{{ .ProjectName }}/build_install_run.go"
   216        - src: "builtin"
   217          dst: "/usr/lib/{{ .ProjectName }}/builtin"
   218        - src: "cl"
   219          dst: "/usr/lib/{{ .ProjectName }}/cl"
   220        - src: "cmd"
   221          dst: "/usr/lib/{{ .ProjectName }}/cmd"
   222        - src: "doc"
   223          dst: "/usr/lib/{{ .ProjectName }}/doc"
   224        - src: "env"
   225          dst: "/usr/lib/{{ .ProjectName }}/env"
   226        - src: "format"
   227          dst: "/usr/lib/{{ .ProjectName }}/format"
   228        - src: "gengo.go"
   229          dst: "/usr/lib/{{ .ProjectName }}/gengo.go"
   230        - src: "go.mod"
   231          dst: "/usr/lib/{{ .ProjectName }}/go.mod"
   232        - src: "go.sum"
   233          dst: "/usr/lib/{{ .ProjectName }}/go.sum"
   234        - src: "imp.go"
   235          dst: "/usr/lib/{{ .ProjectName }}/imp.go"
   236        - src: "load.go"
   237          dst: "/usr/lib/{{ .ProjectName }}/load.go"
   238        - src: "make.bash"
   239          dst: "/usr/lib/{{ .ProjectName }}/make.bash"
   240        - src: "make.bat"
   241          dst: "/usr/lib/{{ .ProjectName }}/make.bat"
   242        - src: "outline.go"
   243          dst: "/usr/lib/{{ .ProjectName }}/outline.go"
   244        - src: "parser"
   245          dst: "/usr/lib/{{ .ProjectName }}/parser"
   246        - src: "printer"
   247          dst: "/usr/lib/{{ .ProjectName }}/printer"
   248        - src: "scanner"
   249          dst: "/usr/lib/{{ .ProjectName }}/scanner"
   250        - src: "test"
   251          dst: "/usr/lib/{{ .ProjectName }}/test"
   252        - src: "testdata"
   253          dst: "/usr/lib/{{ .ProjectName }}/testdata"
   254        - src: "tidy.go"
   255          dst: "/usr/lib/{{ .ProjectName }}/tidy.go"
   256        - src: "token"
   257          dst: "/usr/lib/{{ .ProjectName }}/token"
   258        - src: "x"
   259          dst: "/usr/lib/{{ .ProjectName }}/x"
   260        # symlinks to binaries
   261        - src: "/usr/lib/{{ .ProjectName }}/bin/gop"
   262          dst: /usr/bin/gop
   263          type: symlink
   264        - src: "/usr/lib/{{ .ProjectName }}/bin/gopfmt"
   265          dst: /usr/bin/gopfmt
   266          type: symlink
   267  
   268  snapcrafts:
   269    - id: gop
   270      name: gop
   271      title: The Go+ Programming Language
   272      summary: The Go+ Programming Language
   273      description: |
   274        The Go+ programming language is designed for engineering, STEM education, and data science.
   275        - For engineering: working in the simplest language that can be mastered by children.
   276        - For STEM education: studying an engineering language that can be used for work in the future.
   277        - For data science: communicating with engineers in the same language.
   278      confinement: classic
   279      license: Apache-2.0
   280      name_template: >-
   281        {{ .ProjectName }}{{.Version}}.{{ .Os }}-{{ .Arch }}
   282        {{- if .Arm }}v{{ .Arm }}{{ end }}
   283      extra_files:
   284        # source folder
   285        - source: "CODE_OF_CONDUCT.md"
   286          destination: "CODE_OF_CONDUCT.md"
   287        - source: "Dockerfile"
   288          destination: "Dockerfile"
   289        - source: "LICENSE"
   290          destination: "LICENSE"
   291        - source: "Makefile"
   292          destination: "Makefile"
   293        - source: "README.md"
   294          destination: "README.md"
   295        - source: "_gendeps.go"
   296          destination: "_gendeps.go"
   297        - source: "all.bash"
   298          destination: "all.bash"
   299        - source: "all.bat"
   300          destination: "all.bat"
   301        - source: "ast"
   302          destination: "ast"
   303        - source: "build_install_run.go"
   304          destination: "build_install_run.go"
   305        - source: "builtin"
   306          destination: "builtin"
   307        - source: "cl"
   308          destination: "cl"
   309        - source: "cmd"
   310          destination: "cmd"
   311        - source: "doc"
   312          destination: "doc"
   313        - source: "env"
   314          destination: "env"
   315        - source: "format"
   316          destination: "format"
   317        - source: "gengo.go"
   318          destination: "gengo.go"
   319        - source: "go.mod"
   320          destination: "go.mod"
   321        - source: "go.sum"
   322          destination: "go.sum"
   323        - source: "imp.go"
   324          destination: "imp.go"
   325        - source: "load.go"
   326          destination: "load.go"
   327        - source: "make.bash"
   328          destination: "make.bash"
   329        - source: "make.bat"
   330          destination: "make.bat"
   331        - source: "outline.go"
   332          destination: "outline.go"
   333        - source: "parser"
   334          destination: "parser"
   335        - source: "printer"
   336          destination: "printer"
   337        - source: "scanner"
   338          destination: "scanner"
   339        - source: "test"
   340          destination: "test"
   341        - source: "testdata"
   342          destination: "testdata"
   343        - source: "tidy.go"
   344          destination: "tidy.go"
   345        - source: "token"
   346          destination: "token"
   347        - source: "x"
   348          destination: "x"
   349      apps:
   350        gop:
   351          command: "gop"
   352          aliases: ["gop"]
   353          environment:
   354            GOPROOT: "$SNAP"
   355        gopfmt:
   356          command: "gopfmt"
   357          aliases: ["gopfmt"]
   358          environment:
   359            GOPROOT: "$SNAP"
   360  
   361  checksum:
   362    name_template: "{{ .ProjectName }}{{ .Version }}.checksums.txt"
   363  
   364  release:
   365    prerelease: auto