Skip to content

Commit

Permalink
Revert "Add Windows MSI to the release (#560)" (#570)
Browse files Browse the repository at this point in the history
This reverts commit 4e8f050.
  • Loading branch information
mx-psi committed Jun 4, 2024
1 parent 99faa93 commit b8551a7
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 227 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/base-ci-goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GOARCH: arm
- GOOS: windows
GOARCH: s390x
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04

steps:
- name: Checkout
Expand All @@ -45,11 +45,6 @@ jobs:
with:
platforms: arm64,ppc64le,linux/arm/v7,s390x

- name: Setup wixl
run: |
sudo apt-get update
sudo apt-get install -y wixl
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/base-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
GOARCH: arm
- GOOS: windows
GOARCH: s390x
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

release:
name: ${{ inputs.distribution }} Release
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
needs: prepare

permissions:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ This repository contains a set of resources that ultimately results in OpenTelem

### Distribution directory

Each distribution has its own directory under the [`distributions`](./distributions/) folder, such as [`otelcol`](./distributions/otelcol/).
Within each one of those, you'll find at least two files:
Each distribution has its own directory at the root of this repository, such as `opentelemetry-collector`. Within each one of those, you'll find at least two files:

- `Dockerfile`, determining how to build the container image for this distribution
- `manifest.yaml`, which is used with [ocb](https://github.com/open-telemetry/opentelemetry-collector/tree/main/cmd/builder) to generate the sources for the distribution.
Expand Down
26 changes: 3 additions & 23 deletions cmd/goreleaser/internal/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import (
"path"
"strings"

"github.com/goreleaser/goreleaser-pro/pkg/config"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/nfpm/v2/files"
)

const ArmArch = "arm"
Expand All @@ -44,7 +45,6 @@ func Generate(dist string) config.Project {
Env: []string{"COSIGN_YES=true"},
Builds: Builds(dist),
Archives: Archives(dist),
MSI: WinPackages(dist),
NFPMs: Packages(dist),
Dockers: DockerImages(dist),
DockerManifests: DockerManifests(dist),
Expand Down Expand Up @@ -102,26 +102,6 @@ func Archive(dist string) config.Archive {
}
}

func WinPackages(dist string) []config.MSI {
return []config.MSI{
WinPackage(dist),
}
}

// Package configures goreleaser to build a Windows MSI package.
// https://goreleaser.com/customization/msi/
func WinPackage(dist string) config.MSI {
return config.MSI{
ID: dist,
Name: fmt.Sprintf("%s_{{ .Version }}_{{ .Os }}_{{ .MsiArch }}", dist),
WXS: "windows-installer.wxs",
Files: []string{
"config.yaml",
"opentelemetry.ico",
},
}
}

func Packages(dist string) (r []config.NFPM) {
return []config.NFPM{
Package(dist),
Expand All @@ -147,7 +127,7 @@ func Package(dist string) config.NFPM {
PostInstall: "postinstall.sh",
PreRemove: "preremove.sh",
},
Contents: config.NFPMContents{
Contents: files.Contents{
{
Source: fmt.Sprintf("%s.service", dist),
Destination: path.Join("/lib", "systemd", "system", fmt.Sprintf("%s.service", dist)),
Expand Down
7 changes: 0 additions & 7 deletions distributions/otelcol-contrib/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ partial:
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
msi:
- id: otelcol-contrib
name: otelcol-contrib_{{ .Version }}_{{ .Os }}_{{ .MsiArch }}
wxs: windows-installer.wxs
extra_files:
- config.yaml
- opentelemetry.ico
builds:
- id: otelcol-contrib
goos:
Expand Down
Binary file removed distributions/otelcol-contrib/opentelemetry.ico
Binary file not shown.
88 changes: 0 additions & 88 deletions distributions/otelcol-contrib/windows-installer.wxs

This file was deleted.

7 changes: 0 additions & 7 deletions distributions/otelcol/.goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ partial:
project_name: opentelemetry-collector-releases
env:
- COSIGN_YES=true
msi:
- id: otelcol
name: otelcol_{{ .Version }}_{{ .Os }}_{{ .MsiArch }}
wxs: windows-installer.wxs
extra_files:
- config.yaml
- opentelemetry.ico
builds:
- id: otelcol
goos:
Expand Down
Binary file removed distributions/otelcol/opentelemetry.ico
Binary file not shown.
88 changes: 0 additions & 88 deletions distributions/otelcol/windows-installer.wxs

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.21.7

require (
github.com/goreleaser/goreleaser-pro v1.25.1-pro
github.com/goreleaser/goreleaser v1.25.1
github.com/goreleaser/nfpm/v2 v2.37.1
gopkg.in/yaml.v3 v3.0.1
)
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ github.com/goreleaser/fileglob v1.3.0 h1:/X6J7U8lbDpQtBvGcwwPS6OpzkNVlVEsFUVRx9+
github.com/goreleaser/fileglob v1.3.0/go.mod h1:Jx6BoXv3mbYkEzwm9THo7xbr5egkAraxkGorbJb4RxU=
github.com/goreleaser/goreleaser v1.25.1 h1:a9skjeROotTN5GPPJDHDfhmOK4n13cBgJ34sTdXRDN0=
github.com/goreleaser/goreleaser v1.25.1/go.mod h1:nsbhCYp9eImbE2fyd9/3Tgv5hjuGuDIQRoBozEUEYbc=
github.com/goreleaser/goreleaser-pro v1.25.1-pro h1:NOoSx96oAK0zNA1+hiL0p6pY1DWL101kwPmpmkiExXk=
github.com/goreleaser/goreleaser-pro v1.25.1-pro/go.mod h1:7q9HURJC4ZYBT9VyX3XlqjK0kwe5QbG/VIUAJSP3CKc=
github.com/goreleaser/nfpm/v2 v2.37.1 h1:RUmeEt8OlEVeSzKRrO5Vl5qVWCtUwx4j9uivGuRo5fw=
github.com/goreleaser/nfpm/v2 v2.37.1/go.mod h1:q8+sZXFqn106/eGw+9V+I8+izFxZ/sJjrhwmEUxXhUg=
github.com/invopop/jsonschema v0.12.0 h1:6ovsNSuvn9wEQVOyc72aycBMVQFKz7cPdMJn10CvzRI=
Expand Down

0 comments on commit b8551a7

Please sign in to comment.