latest.yml fix

This commit is contained in:
nicwands
2026-05-18 15:20:54 -04:00
parent 65094d3df6
commit 18a5730605
3 changed files with 27 additions and 7 deletions

View File

@@ -2,10 +2,6 @@
An Electron application with Vue An Electron application with Vue
## Recommended IDE Setup
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar)
## Project Setup ## Project Setup
### Install ### Install

View File

@@ -71,6 +71,23 @@ const uploadFile = async (filePath, platform, version) => {
) )
} }
const uploadFileToRoot = async (filePath, platform) => {
const fileStream = fs.createReadStream(filePath)
const fileName = path.basename(filePath)
const key = `${platform}/${fileName}`
console.log(`Uploading ${fileName}${key} (latest)`)
await client.send(
new PutObjectCommand({
Bucket: BUCKET,
Key: key,
Body: fileStream,
ContentType: getContentType(fileName),
}),
)
}
const main = async () => { const main = async () => {
const platform = process.argv[2] const platform = process.argv[2]
const version = process.argv[3] const version = process.argv[3]
@@ -128,8 +145,14 @@ const main = async () => {
for (const file of uploadTargets) { for (const file of uploadTargets) {
const fullPath = path.join(DIST_DIR, file) const fullPath = path.join(DIST_DIR, file)
// Keep latest.yml up to date for platform
if (file.startsWith('latest') && file.endsWith('.yml')) {
await uploadFileToRoot(fullPath, platform)
} else {
await uploadFile(fullPath, platform, version) await uploadFile(fullPath, platform, version)
} }
}
console.log('Upload complete.') console.log('Upload complete.')
} }

View File

@@ -30,11 +30,12 @@ dmg:
linux: linux:
target: target:
- AppImage - AppImage
# - snap
- deb - deb
maintainer: electronjs.org maintainer: electronjs.org
category: Utility category: Utility
appImage: appImage:
artifactName: ${name}-${version}.${ext} artifactName: ${name}-${version}.${ext}
npmRebuild: false npmRebuild: false
publish: null publish:
provider: generic
url: https://s3.takerofnotes.com/dist