latest.yml fix
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
|
||||
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
|
||||
|
||||
### Install
|
||||
|
||||
@@ -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 platform = process.argv[2]
|
||||
const version = process.argv[3]
|
||||
@@ -128,8 +145,14 @@ const main = async () => {
|
||||
|
||||
for (const file of uploadTargets) {
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Upload complete.')
|
||||
}
|
||||
|
||||
@@ -30,11 +30,12 @@ dmg:
|
||||
linux:
|
||||
target:
|
||||
- AppImage
|
||||
# - snap
|
||||
- deb
|
||||
maintainer: electronjs.org
|
||||
category: Utility
|
||||
appImage:
|
||||
artifactName: ${name}-${version}.${ext}
|
||||
npmRebuild: false
|
||||
publish: null
|
||||
publish:
|
||||
provider: generic
|
||||
url: https://s3.takerofnotes.com/dist
|
||||
|
||||
Reference in New Issue
Block a user