Skip to content

Commit 00d5d72

Browse files
committed
2 parents b8407ff + 1f7281b commit 00d5d72

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# uEssentials
22

3+
[![Join in our discord](https://discordapp.com/api/guilds/325080396868091906/widget.png)](https://discord.gg/JtHwhNq)
34
[![Join the chat at https://gitter.im/uEssentials/uEssentials](https://badges.gitter.im/uEssentials/uEssentials.svg)](https://gitter.im/uEssentials/uEssentials?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
45
[![Build status](https://ci.appveyor.com/api/projects/status/pxm15136lg6mcd2n?svg=true)](https://ci.appveyor.com/project/leonardosnt/uessentials)
56
[![Releases download count](https://www.dropbox.com/sh/chkgkpe8ksfanbe/AADrLVEwOZkz65faac71go6oa/total.svg?raw=1)](https://goo.gl/uql6bm)
@@ -45,4 +46,4 @@ If you have any questions or suggestions, feel free to send them to us [here](ht
4546

4647
## License
4748
Copyright (C) 2015-2017 leonardosnt <[email protected]> and contributors.
48-
Licensed under the GPL v2 License. See LICENSE file in the project root for full license information.
49+
Licensed under the GPL v2 License. See LICENSE file in the project root for full license information.

scripts/deploy.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ const UPLOAD_RELEASE_URL = `https://uploads.github.com/repos/${REPO}/releases/{i
3939

4040
const RELEASE_BODY = `Released at {date}\r\n\r\nRelease for commit: https://github.com/uEssentials/uEssentials/commit/${COMMIT} (${process.env['APPVEYOR_REPO_COMMIT_MESSAGE']})`;
4141

42+
let shortSha = COMMIT.substring(0, 7);
43+
4244
function createRelease(version) {
4345
let res = request('POST', CREATE_RELEASE_URL, {
4446
headers: {
@@ -55,6 +57,7 @@ function createRelease(version) {
5557
});
5658
if (res.body.toString().indexOf('already_exists') > -1) {
5759
console.log(`Release for commit ${COMMIT} already exists. Exiting...`);
60+
fs.writeFileSync('download_url', `https://github.com/uEssentials/Builds/releases/tag/build-${shortSha}`);
5861
process.exit(0);
5962
}
6063
return JSON.parse(res.getBody('utf8'));
@@ -94,8 +97,6 @@ request('PUT', `https://api.github.com/repos/${REPO}/contents/README.md?access_t
9497
});
9598

9699
// Create release & upload asset
97-
let shortSha = COMMIT.substring(0, 7);
98-
99100
uploadAsset(createRelease(`build-${shortSha}`), 'deploy/uEssentials.zip', `uEssentials-build-${shortSha}.zip`);
100101

101102
// Add 'Download available' status
@@ -107,4 +108,6 @@ request("POST", `https://api.github.com/repos/uessentials/uessentials/statuses/$
107108
description: "available!",
108109
context: "Download"
109110
})
110-
});
111+
});
112+
113+
fs.writeFileSync('download_url', `https://github.com/uEssentials/Builds/releases/tag/build-${shortSha}`);

0 commit comments

Comments
 (0)