Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ jobs:
artifacts/**/*.AppImage
artifacts/**/*.deb
artifacts/**/*.rpm
artifacts/**/*.sha256
draft: true
fail_on_unmatched_files: true
env:
Expand Down
2 changes: 1 addition & 1 deletion app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
runtime = electron
disturl = https://electronjs.org/headers
target = 24.4.0
target = 24.6.5
4 changes: 0 additions & 4 deletions app/src/lib/editors/linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,6 @@ const editors: ILinuxExternalEditor[] = [
name: 'Mousepad',
paths: ['/usr/bin/mousepad'],
},
{
name: 'IntelliJ PhpStorm',
paths: ['/snap/bin/phpstorm'],
},
]

async function getAvailablePath(paths: string[]): Promise<string | null> {
Expand Down
12 changes: 0 additions & 12 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ distribution:
- AppImage (`.AppImage`)
- Debian (`.deb`)
- RPM (`.rpm`)
- Snap (`.snap`) - also available from [snapcraft.io](https://snapcraft.io/github-desktop)

If you install the Snap package, ensure you also connect it to your password
manager:

```shellsession
$ sudo snap connect github-desktop:password-manager-service
```

Without this, GitHub Desktop cannot store or retrieve account details it
requires in the user's keychain.

## Data Directories

Expand All @@ -50,7 +39,6 @@ GitHub Desktop will create directories to manage the files and data it needs to
This varies based on the installer chosen:

- AppImage, Debian and RPM: `~/.config/GitHub Desktop/`
- Snap: `~/snap/github-desktop/current/.config/GitHub Desktop/`

## Log Files

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
"@types/webpack-hot-middleware": "^2.25.6",
"@types/webpack-merge": "^5.0.0",
"@types/xml2js": "^0.4.11",
"electron": "24.4.0",
"electron": "24.6.5",
"electron-builder": "^24.6.3",
"electron-packager": "^17.1.1",
"eslint-plugin-github": "^4.3.7",
Expand Down
9 changes: 1 addition & 8 deletions script/electron-builder-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,4 @@ linux:
- x-scheme-handler/x-github-desktop-dev-auth
target:
- AppImage
maintainer: 'GitHub, Inc <opensource+desktop@github.com>'
rpm:
depends:
# dugite-native dependencies
- libcurl
# keytar dependencies
- libsecret
- gnome-keyring
maintainer: 'Brendan Forster<github@brendanforster.com>'
94 changes: 10 additions & 84 deletions script/generate-release-notes.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
/* eslint-disable no-sync */

const glob = require('glob')
const { basename, dirname, join } = require('path')
const { dirname, join } = require('path')
const fs = require('fs')

type ChecksumEntry = { filename: string; checksum: string }

type ChecksumGroups = Record<'x64' | 'arm' | 'arm64', Array<ChecksumEntry>>

type ReleaseNotesGroupType = 'new' | 'added' | 'fixed' | 'improved' | 'removed'

type ReleaseNotesGroups = Record<ReleaseNotesGroupType, Array<ReleaseNoteEntry>>
Expand Down Expand Up @@ -45,51 +41,22 @@ console.log(

const files = new Glob(artifactsDir + '/**/*', { nodir: true })

let countFiles = 0
const shaEntries = new Array<ChecksumEntry>()
const matches = files.found as Array<string>

for (const file of files.found) {
if (file.endsWith('.sha256')) {
shaEntries.push(getShaContents(file))
}
const fileCount = matches.length

countFiles++
}

if (SUCCESSFUL_RELEASE_FILE_COUNT !== countFiles) {
if (SUCCESSFUL_RELEASE_FILE_COUNT !== fileCount) {
console.error(
`🔴 Artifacts folder has ${countFiles} assets, expecting ${SUCCESSFUL_RELEASE_FILE_COUNT}. Please check the GH Actions artifacts to see which are missing.`
`🔴 Artifacts folder has ${fileCount} assets, expecting ${SUCCESSFUL_RELEASE_FILE_COUNT}. Please check the GH Actions artifacts to see which are missing.`
)
process.exit(1)
}

const shaEntriesByArchitecture: ChecksumGroups = {
x64: shaEntries.filter(
e =>
e.filename.includes('-linux-x86_64-') ||
e.filename.includes('-linux-amd64-')
),
arm: shaEntries.filter(
e =>
e.filename.includes('-linux-armv7l-') ||
e.filename.includes('-linux-armhf-')
),
arm64: shaEntries.filter(
e =>
e.filename.includes('-linux-aarch64-') ||
e.filename.includes('-linux-arm64-')
),
}

console.log(`Found ${countFiles} files in artifacts directory`)
console.log(shaEntriesByArchitecture)
console.log(`Found ${fileCount} files in artifacts directory`)

const releaseNotesByGroup = getReleaseGroups(releaseTagWithoutPrefix)

const draftReleaseNotes = generateDraftReleaseNotes(
releaseNotesByGroup,
shaEntriesByArchitecture
)
const draftReleaseNotes = generateDraftReleaseNotes(releaseNotesByGroup)
const releaseNotesPath = join(__dirname, 'release_notes.txt')

fs.writeFileSync(releaseNotesPath, draftReleaseNotes, { encoding: 'utf8' })
Expand All @@ -98,19 +65,6 @@ console.log(
`✅ All done! The release notes have been written to ${releaseNotesPath}`
)

/**
* Returns the filename (excluding .sha256) and its contents (a SHA256 checksum).
*/
function getShaContents(filePath: string): {
filename: string
checksum: string
} {
const filename = basename(filePath).slice(0, -7)
const checksum = fs.readFileSync(filePath, 'utf8')

return { filename, checksum }
}

function extractIds(str: string): Array<number> {
const idRegex = /#(\d+)/g

Expand Down Expand Up @@ -261,44 +215,16 @@ ${itemsText}
`
}

function formatEntry(e: ChecksumEntry): string {
return `${e.checksum} ${e.filename}`
}

function renderArchitectureIfNotEmpty(
name: string,
items: Array<ChecksumEntry>
): string {
if (items.length === 0) {
return ''
}

const itemsText = items.map(formatEntry).join('\n')

return `
## ${name}

${itemsText}`
}

/**
* Takes the release notes entries and the SHA entries, then merges them into the full draft release notes ✨
*/
function generateDraftReleaseNotes(
releaseNotesGroups: ReleaseNotesGroups,
shaEntries: ChecksumGroups
releaseNotesGroups: ReleaseNotesGroups
): string {
const draftReleaseNotes = `
return `
${renderSection('New', releaseNotesGroups.new)}
${renderSection('Added', releaseNotesGroups.added)}
${renderSection('Fixed', releaseNotesGroups.fixed, false)}
${renderSection('Improved', releaseNotesGroups.improved, false)}
${renderSection('Removed', releaseNotesGroups.removed)}

## SHA-256 checksums
${renderArchitectureIfNotEmpty('x64', shaEntries.x64)}
${renderArchitectureIfNotEmpty('ARM64', shaEntries.arm64)}
${renderArchitectureIfNotEmpty('ARM', shaEntries.arm)}`

return draftReleaseNotes
${renderSection('Removed', releaseNotesGroups.removed)}`
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3789,10 +3789,10 @@ electron-winstaller@*, electron-winstaller@^5.0.0:
lodash.template "^4.2.2"
temp "^0.9.0"

electron@24.4.0:
version "24.4.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-24.4.0.tgz#48d05561dab6a5835ec1a3a96852797f69824eea"
integrity sha512-A9YzLHRUA+HfYVf2daNv0jPXNCWShgcgcTaGntrZRGynQLEhDTbti9Lfmq2tjRKoEgXZ7qj+aJFw+tJZsT/Cfw==
electron@24.6.5:
version "24.6.5"
resolved "https://registry.yarnpkg.com/electron/-/electron-24.6.5.tgz#9259f682cc8a3dda6573e5e59350c38f8522f04a"
integrity sha512-31LhBrGJwdLmMxLuedjuTy576JYtuOlDObNWGq3t4ZXUzC1WAvV/0kZ0dlbYNgsmeJTncIP5hELZU8YpPQo27g==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^18.11.18"
Expand Down