-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.goreleaser.yaml
More file actions
133 lines (112 loc) · 6.09 KB
/
.goreleaser.yaml
File metadata and controls
133 lines (112 loc) · 6.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
# The lines below 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
version: 2
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
project_name: zed-cli-win-unofficial
builds:
- env:
- CGO_ENABLED=0
goos:
- windows
goarch:
- amd64
main: .
ldflags:
- -s -w
binary: zed-cli-win-unofficial
archives:
- formats: [zip]
files:
- src: "scripts/zed.bat"
dst: zed.bat
name_template: >-
{{ .ProjectName }}_v{{ .Version }}
{{- if eq .Arch "amd64" }}x86_64
{{- else }}{{ .Arch }}{{ end }}
wrap_in_directory: "{{ .ProjectName }}"
format_overrides:
- goos: windows
formats: [zip]
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
# By default, GoReleaser uploads:
# - All archives (your ZIP files)
# - Checksums
# - Any other configured artifacts (like Chocolatey packages)
footer: >-
---
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
scoops:
- name: zed-cli-win-unofficial
url_template: "https://github.com/SameerJS6/zed-cli-win-unofficial/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
commit_author:
name: SameerJS6
email: sameerjs6@users.noreply.github.com
commit_msg_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }} by GoReleaser"
homepage: "https://zedcli.sameerjs.com"
# App description - the usual guideline is to wrap at 80 chars
description: |
An unofficial Windows CLI launcher for Zed editor that provides:
* Configurable zed.exe path detection
* Launching & Managing mulitple instance of zed
* Path launching with 'zed .' to open directories
* Running 'zed' without arguments opens the last project
* Integration with Windows context menu (Open with Zed)
* Environment variable parsing for installation paths
This tool is not affiliated with or endorsed by the Zed team.
license: MIT
post_install:
[
"Write-Host 'Zed CLI installed successfully!' -ForegroundColor Green",
"Write-Host 'Sending a small analytics event to help us understand usage patterns. No personal data is collected — nothing to worry about!' -ForegroundColor Blue",
'try { $apiUrl = ''https://zedcli.sameerjs.com/api/analytics''; $eventType = ''scoop_installation_completed''; $machineId = "$env:COMPUTERNAME-$env:USERNAME"; $hasher = [System.Security.Cryptography.MD5]::Create(); $hashBytes = $hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($machineId)); $anonymousUserId = [System.BitConverter]::ToString($hashBytes).Replace(''-'', '''').Substring(0, 16); $sessionId = [System.Guid]::NewGuid().ToString(); $analyticsData = @{ event = "zed_win_cli_$eventType"; properties = @{ project = ''zed-cli-win-unofficial''; os = ''windows''; os_version = (Get-CimInstance Win32_OperatingSystem).Caption; arch = $env:PROCESSOR_ARCHITECTURE; session_id = $sessionId; user_id = $anonymousUserId.ToLower(); timestamp = $(Get-Date -Format ''yyyy-MM-ddTHH:mm:ssZ''); cli_version = ''v1.0.0''; install_method = ''scoop''; installer_type = ''scoop_cli_only''; powershell_version = $PSVersionTable.PSVersion.ToString(); is_admin = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] ''Administrator'') } } | ConvertTo-Json; $job = Start-Job -ScriptBlock { param($url, $data); try { Invoke-RestMethod -Uri $url -Method Post -Body $data -ContentType ''application/json'' -TimeoutSec 3 -ErrorAction SilentlyContinue } catch { } } -ArgumentList $apiUrl, $analyticsData; Register-ObjectEvent -InputObject $job -EventName StateChanged -Action { if ($Event.Sender.State -eq ''Completed'' -or $Event.Sender.State -eq ''Failed'') { Remove-Job $Event.Sender -Force -ErrorAction SilentlyContinue; Unregister-Event $Event.SourceIdentifier -ErrorAction SilentlyContinue } } | Out-Null } catch { }',
]
repository:
owner: SameerJS6
name: zed-cli-win-unofficial # ← Same as your main repo!
branch: main
token: "{{ .Env.GITHUB_TOKEN }}"
skip_upload: false
chocolateys:
- name: zed-cli-win-unofficial
title: Zed CLI for Windows (Unofficial)
authors: SameerJS6
package_source_url: https://github.com/SameerJS6/zed-cli-win-unofficial
project_url: https://zedcli.sameerjs.com
url_template: "https://github.com/SameerJS6/zed-cli-win-unofficial/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
icon_url: https://mcp4lhyypl.ufs.sh/f/9Vzc0FiUzX7RKBAXfat0u6dW8rnOt3KwNAkUjzbfxlyYqShF
copyright: 2024 SameerJS6
license_url: https://github.com/SameerJS6/zed-cli-win-unofficial/blob/main/LICENSE
require_license_acceptance: false
project_source_url: https://github.com/SameerJS6/zed-cli-win-unofficial
docs_url: https://github.com/SameerJS6/zed-cli-win-unofficial/blob/main/readme.md
bug_tracker_url: https://github.com/SameerJS6/zed-cli-win-unofficial/issues
tags: "zed editor cli windows launcher unofficial"
summary: Unofficial Windows CLI launcher for Zed editor
description: |
An unofficial Windows CLI launcher for Zed editor that provides:
* Configurable zed.exe path
* Launching & Managing mulitple instance of zed
* Path launching with 'zed .' to open directories
* Running 'zed' without arguments opens the last project
* Integration with Windows context menu (Open with Zed)
* Environment variable parsing for installation paths
This tool is not affiliated with or endorsed by the Zed team.
release_notes: "https://github.com/SameerJS6/zed-cli-win-unofficial/releases/tag/v{{ .Version }}"
api_key: "{{ .Env.CHOCOLATEY_API_KEY }}"
source_repo: "https://push.chocolatey.org/"
skip_publish: false