Add new builds, and update ext
This commit is contained in:
12
.github/workflows/build-and-release.yml
vendored
12
.github/workflows/build-and-release.yml
vendored
@@ -163,7 +163,7 @@ jobs:
|
|||||||
- name: Merge latest .ymls
|
- name: Merge latest .ymls
|
||||||
uses: mikefarah/yq@v4.44.6
|
uses: mikefarah/yq@v4.44.6
|
||||||
with:
|
with:
|
||||||
cmd: yq ea '. as $item ireduce ({}; . * $item )' dist/*/*.yml > dist/combined.yml
|
cmd: yq eval-all '. as $item ireduce ({}; . * $item )' dist/*/*.yml > merged.yml
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
id: create_release
|
id: create_release
|
||||||
@@ -176,7 +176,7 @@ jobs:
|
|||||||
dist/linux/*.AppImage
|
dist/linux/*.AppImage
|
||||||
dist/windows/*.exe
|
dist/windows/*.exe
|
||||||
dist/macos/*.dmg
|
dist/macos/*.dmg
|
||||||
dist/combined.yml
|
merged.yml
|
||||||
|
|
||||||
aur:
|
aur:
|
||||||
name: Publish to AUR
|
name: Publish to AUR
|
||||||
@@ -184,24 +184,20 @@ jobs:
|
|||||||
needs: release
|
needs: release
|
||||||
env:
|
env:
|
||||||
AUR_TOKEN: ${{ secrets.AUR_TOKEN }}
|
AUR_TOKEN: ${{ secrets.AUR_TOKEN }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout git repo
|
- name: Checkout git repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Download checksums
|
- name: Download checksums
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: checksums
|
name: checksums
|
||||||
path: ./sha256sum.txt
|
path: ./sha256sum.txt
|
||||||
|
|
||||||
- name: Extract checksum from sha256sum.txt
|
- name: Extract checksum from sha256sum.txt
|
||||||
run: |
|
run: |
|
||||||
new_checksum=$(awk 'NR==1 { print $1 }' ./sha256sum.txt)
|
new_checksum=$(awk 'NR==1 { print $1 }' ./sha256sum.txt)
|
||||||
sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/PKGBUILD
|
sed -i "s|sha256sums=('SKIP' 'SKIP')|sha256sums=('$new_checksum' 'SKIP')|" ./build/PKGBUILD
|
||||||
|
|
||||||
- name: Publish AUR package
|
- name: Publish AUR package
|
||||||
uses: KSXGitHub/github-actions-deploy-aur@3.0.1
|
uses: KSXGitHub/github-actions-deploy-aur@v3.0.1
|
||||||
with:
|
with:
|
||||||
pkgname: bskydesktop
|
pkgname: bskydesktop
|
||||||
pkgbuild: ./build/PKGBUILD
|
pkgbuild: ./build/PKGBUILD
|
||||||
@@ -209,4 +205,4 @@ jobs:
|
|||||||
commit_email: ${{ secrets.AUR_EMAIL }}
|
commit_email: ${{ secrets.AUR_EMAIL }}
|
||||||
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
|
||||||
commit_message: New Version
|
commit_message: New Version
|
||||||
ssh_keyscan_types: rsa,ecdsa,ed25519
|
ssh_keyscan_types: rsa,ecdsa,ed25519
|
@@ -38,6 +38,10 @@
|
|||||||
],
|
],
|
||||||
"artifactName": "bsky-desktop.${ext}",
|
"artifactName": "bsky-desktop.${ext}",
|
||||||
"mac": {
|
"mac": {
|
||||||
|
"target": [
|
||||||
|
"dmg",
|
||||||
|
"pkg"
|
||||||
|
],
|
||||||
"icon": "src/ui/images/logo.icns",
|
"icon": "src/ui/images/logo.icns",
|
||||||
"category": "Network"
|
"category": "Network"
|
||||||
},
|
},
|
||||||
|
@@ -44,11 +44,11 @@ global.urls = {
|
|||||||
|
|
||||||
// Settings urls:
|
// Settings urls:
|
||||||
global.settings = {
|
global.settings = {
|
||||||
general: `${global.urls.main}/settings`,
|
general: `${global.urls.main}/settings`
|
||||||
account: `${global.urls.main}/settings/account`,
|
|
||||||
appearance: `${global.urls.main}/settings/appearance`,
|
|
||||||
privacy: `${global.urls.main}/settings/privacy-and-security`,
|
|
||||||
};
|
};
|
||||||
|
global.settings.account = `${global.settings.general}/account`;
|
||||||
|
global.settings.appearance = `${global.settings.general}/appearance`;
|
||||||
|
global.settings.privacy = `${global.settings.general}/privacy-and-security`;
|
||||||
|
|
||||||
// Badge options:
|
// Badge options:
|
||||||
const badgeOptions = {
|
const badgeOptions = {
|
||||||
|
@@ -79,33 +79,75 @@ function asarUpdate() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function checkForUpdates() {
|
function checkForUpdates() {
|
||||||
|
// Current system information
|
||||||
|
logger.log('Current system information:', sys.platform, sys.getVersion());
|
||||||
|
|
||||||
// Check if the current system is Windows
|
// Check if the current system is Windows
|
||||||
if (sys.isWin()) {
|
if (sys.isWin()) {
|
||||||
// Check if the system is before Windows 10
|
// Check if the system is before Windows 10
|
||||||
if (sys.laterThan('10.0.0')) {
|
if (sys.earlierThan('10.0.0')) {
|
||||||
// Check for updates, and if there are updates, download and install them
|
|
||||||
logger.log('Checking for updates (win)...');
|
|
||||||
} else {
|
|
||||||
// Windows 10 and above are supported, but windows 7 and 8 are not supported
|
// Windows 10 and above are supported, but windows 7 and 8 are not supported
|
||||||
logger.error('Windows 7 and 8 are not supported, please upgrade to Windows 10 or above, not updating...');
|
logger.error('Windows 7 and 8 are not supported, please upgrade to Windows 10 or above, not updating...');
|
||||||
|
} else {
|
||||||
|
// Check for updates, and if there are updates, download and install them
|
||||||
|
logger.log('Checking for updates (win)...');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the current system is macOS
|
// Check if the current system is macOS
|
||||||
if (sys.isMac()) {
|
if (sys.isMac()) {
|
||||||
// Check if the current version is later than macOS 10.15.0
|
let macArch = '';
|
||||||
if (sys.laterThan('10.15.0')) {
|
// Check the current version of macOS, and whether we can use the pkg installer
|
||||||
|
if (sys.laterThan('10.0.0')) {
|
||||||
|
// Check if system is after macOS 10 (11, 12, etc.)
|
||||||
|
if (sys.laterThan('11.0.0')) {
|
||||||
|
// macOS 11 and above support ARM64, check if system is ARM64
|
||||||
|
logger.log('Checkking system architecture...');
|
||||||
|
if (sys.isARM64()) {
|
||||||
|
// System is ARM64 (mac-arm64)
|
||||||
|
macArch = 'arm64';
|
||||||
|
} else {
|
||||||
|
// System is Intel (mac-x64)
|
||||||
|
macArch = 'intel';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// macOS 10 is mostly Intel, but some versions are ARM64
|
||||||
|
macArch = 'intel';
|
||||||
|
}
|
||||||
// Check for updates, and if there are updates, download and install them
|
// Check for updates, and if there are updates, download and install them
|
||||||
logger.log('Checking for updates (macOS)...');
|
logger.log('Checking for updates (mac)...');
|
||||||
|
|
||||||
|
// Run the .pkg installer
|
||||||
|
const pkgPath = path.join(global.paths.updateDir, 'bsky-desktop.pkg');
|
||||||
|
const command = `sudo installer -pkg ${pkgPath} -target /`;
|
||||||
|
|
||||||
|
// Spawn a new shell
|
||||||
|
const shellProcess = spawn('sh', ['-c', command], {
|
||||||
|
stdio: 'inherit', // Pipe input/output to/from the shell
|
||||||
|
});
|
||||||
|
|
||||||
|
shellProcess.on('error', (err) => {
|
||||||
|
console.error('Failed to spawn shell:', err);
|
||||||
|
});
|
||||||
|
|
||||||
|
shellProcess.on('close', (code) => {
|
||||||
|
if (code === 0) {
|
||||||
|
console.log('Update installed successfully.');
|
||||||
|
} else {
|
||||||
|
console.error(`Shell process exited with code ${code}.`);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
// macOS 10.15 and above are supported, but macOS 10.14 and below are not supported
|
// macOS versions before 10 are not supported
|
||||||
logger.error('macOS 10.14 and below are not supported, please upgrade to macOS 10.15 or above, not updating...');
|
logger.error('macOS versions before 10 are not supported, not updating...');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if the current system is Linux
|
// Check if the current system is Linux
|
||||||
if (sys.isLinux()) {
|
if (sys.isLinux()) {
|
||||||
// Check for updates, and if there are updates, download and install them (no system version check)
|
// Check for updates, and if there are updates, download and install them (no system version check)
|
||||||
|
// Linux versions use AppImage, so we instead need to check for a new asar file so that the app can
|
||||||
|
// load the new asar instead of the packaged one (or even just delete the old appimage and download a new one)
|
||||||
logger.log('Checking for updates (linux)...');
|
logger.log('Checking for updates (linux)...');
|
||||||
asarUpdate();
|
asarUpdate();
|
||||||
}
|
}
|
||||||
|
@@ -5,6 +5,7 @@ class SystemInfo {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.platform = os.platform(); // 'win32', 'darwin', 'linux'
|
this.platform = os.platform(); // 'win32', 'darwin', 'linux'
|
||||||
this.release = os.release(); // OS version
|
this.release = os.release(); // OS version
|
||||||
|
this.arch = os.arch(); // 'arm', 'arm64', 'x64', 'x86'
|
||||||
this.versionInfo = this._getVersionInfo(); // Parsed version
|
this.versionInfo = this._getVersionInfo(); // Parsed version
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -23,6 +24,26 @@ class SystemInfo {
|
|||||||
return this.platform === 'linux';
|
return this.platform === 'linux';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if current system architecture is ARM
|
||||||
|
isARM() {
|
||||||
|
return this.arch === 'arm';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if current system architecture is ARM64
|
||||||
|
isARM64() {
|
||||||
|
return this.arch === 'arm64';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if current system architecture is x64
|
||||||
|
isX64() {
|
||||||
|
return this.arch === 'x64';
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if current system architecture is x86
|
||||||
|
isX86() {
|
||||||
|
return this.arch === 'x86';
|
||||||
|
}
|
||||||
|
|
||||||
// Compare if current version is later than the given version
|
// Compare if current version is later than the given version
|
||||||
laterThan(compareVersion) {
|
laterThan(compareVersion) {
|
||||||
const current = this.versionInfo;
|
const current = this.versionInfo;
|
||||||
@@ -35,6 +56,11 @@ class SystemInfo {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Compare if current version is earlier than the given version
|
||||||
|
earlierThan(compareVersion) {
|
||||||
|
return !this.laterThan(compareVersion);
|
||||||
|
}
|
||||||
|
|
||||||
// Private: Parse version strings (e.g., "10.0.19045" -> [10, 0, 19045])
|
// Private: Parse version strings (e.g., "10.0.19045" -> [10, 0, 19045])
|
||||||
_parseVersion(version) {
|
_parseVersion(version) {
|
||||||
return version.split('.').map((num) => parseInt(num, 10) || 0);
|
return version.split('.').map((num) => parseInt(num, 10) || 0);
|
||||||
@@ -57,6 +83,11 @@ class SystemInfo {
|
|||||||
return [0, 0, 0]; // Unknown system
|
return [0, 0, 0]; // Unknown system
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Get current version as a string (e.g., "10.15.7")
|
||||||
|
getVersion() {
|
||||||
|
return this.versionInfo.join('.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = SystemInfo;
|
module.exports = SystemInfo;
|
||||||
@@ -66,6 +97,6 @@ module.exports = SystemInfo;
|
|||||||
//console.log(`Is Windows: ${sys.isWin()}`);
|
//console.log(`Is Windows: ${sys.isWin()}`);
|
||||||
//console.log(`Is macOS: ${sys.isMac()}`);
|
//console.log(`Is macOS: ${sys.isMac()}`);
|
||||||
//console.log(`Is Linux: ${sys.isLinux()}`);
|
//console.log(`Is Linux: ${sys.isLinux()}`);
|
||||||
//console.log(`Current Version Info: ${sys.versionInfo.join('.')}`);
|
//console.log(`Current Version Info: ${sys.getVersion()}`);
|
||||||
//console.log(`Later than 10.0.19044: ${sys.laterThan('10.0.19044')}`);
|
//console.log(`Later than 10.0.19044: ${sys.laterThan('10.0.19044')}`);
|
||||||
//console.log(`Later than 5.15.0 (Linux Kernel): ${sys.laterThan('5.15.0')}`);
|
//console.log(`Later than 5.15.0 (Linux Kernel): ${sys.laterThan('5.15.0')}`);
|
@@ -374,6 +374,15 @@ const BskyExt = {
|
|||||||
},
|
},
|
||||||
"regex": /discord\.com\/invite\/([a-zA-Z0-9_]+)/
|
"regex": /discord\.com\/invite\/([a-zA-Z0-9_]+)/
|
||||||
},
|
},
|
||||||
|
"discord_profile": {
|
||||||
|
"name": "Discord",
|
||||||
|
"type": "social",
|
||||||
|
"icon": "fab fa-discord",
|
||||||
|
"brand": {
|
||||||
|
"color": "#7289DA",
|
||||||
|
},
|
||||||
|
"regex": /discord\.com\/users\/([a-zA-Z0-9_]+)/
|
||||||
|
},
|
||||||
"discord.gg": {
|
"discord.gg": {
|
||||||
"name": "Discord",
|
"name": "Discord",
|
||||||
"type": "messaging",
|
"type": "messaging",
|
||||||
@@ -473,6 +482,33 @@ const BskyExt = {
|
|||||||
},
|
},
|
||||||
"regex": /irc:\/\/([a-zA-Z0-9_]+)/
|
"regex": /irc:\/\/([a-zA-Z0-9_]+)/
|
||||||
},
|
},
|
||||||
|
"itchio": {
|
||||||
|
"name": "Itch.io",
|
||||||
|
"type": "content",
|
||||||
|
"icon": "fab fa-itch-io",
|
||||||
|
"brand": {
|
||||||
|
"color": "#FA5C5C",
|
||||||
|
},
|
||||||
|
"regex": /([a-zA-Z0-9_]+)\.itch\.io/
|
||||||
|
},
|
||||||
|
"etsy_shop": {
|
||||||
|
"name": "Etsy",
|
||||||
|
"type": "content",
|
||||||
|
"icon": "fab fa-etsy",
|
||||||
|
"brand": {
|
||||||
|
"color": "#D5641C",
|
||||||
|
},
|
||||||
|
"regex": /etsy\.com\/shop\/([a-zA-Z0-9_]+)/
|
||||||
|
},
|
||||||
|
"etsy_user": {
|
||||||
|
"name": "Etsy",
|
||||||
|
"type": "content",
|
||||||
|
"icon": "fab fa-etsy",
|
||||||
|
"brand": {
|
||||||
|
"color": "#D5641C",
|
||||||
|
},
|
||||||
|
"regex": /([a-zA-Z0-9_]+)\.etsy\.com/
|
||||||
|
},
|
||||||
"email": {
|
"email": {
|
||||||
"name": "Email",
|
"name": "Email",
|
||||||
"type": "messaging",
|
"type": "messaging",
|
||||||
@@ -498,7 +534,43 @@ const BskyExt = {
|
|||||||
"brand": {
|
"brand": {
|
||||||
"color": "#1DA1F2",
|
"color": "#1DA1F2",
|
||||||
},
|
},
|
||||||
"regex": /twitter\.com\/([a-zA-Z0-9_]+)/
|
"regex": /(twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/?$/
|
||||||
|
},
|
||||||
|
"xbox": {
|
||||||
|
"name": "Xbox",
|
||||||
|
"type": "social",
|
||||||
|
"icon": "fab fa-xbox",
|
||||||
|
"brand": {
|
||||||
|
"color": "#107C10",
|
||||||
|
},
|
||||||
|
"regex": /xbox\.com\/([a-zA-Z0-9_]+)/
|
||||||
|
},
|
||||||
|
"playstation": {
|
||||||
|
"name": "PlayStation",
|
||||||
|
"type": "social",
|
||||||
|
"icon": "fab fa-playstation",
|
||||||
|
"brand": {
|
||||||
|
"color": "#003087",
|
||||||
|
},
|
||||||
|
"regex": /playstation\.com\/([a-zA-Z0-9_]+)/
|
||||||
|
},
|
||||||
|
"steam": {
|
||||||
|
"name": "Steam",
|
||||||
|
"type": "content",
|
||||||
|
"icon": "fab fa-steam",
|
||||||
|
"brand": {
|
||||||
|
"color": "#000000",
|
||||||
|
},
|
||||||
|
"regex": /steamcommunity\.com\/id\/([a-zA-Z0-9_]+)/
|
||||||
|
},
|
||||||
|
"tiktok": {
|
||||||
|
"name": "TikTok",
|
||||||
|
"type": "social",
|
||||||
|
"icon": "fab fa-tiktok",
|
||||||
|
"brand": {
|
||||||
|
"color": "#000000",
|
||||||
|
},
|
||||||
|
"regex": /tiktok\.com\/@([a-zA-Z0-9_]+)/
|
||||||
},
|
},
|
||||||
"instagram": {
|
"instagram": {
|
||||||
"name": "Instagram",
|
"name": "Instagram",
|
||||||
@@ -729,6 +801,72 @@ const BskyExt = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constant {Object} linkStylesOverrides - Style overrides for specific link types
|
||||||
|
*/
|
||||||
|
linkStylesOverrides: {
|
||||||
|
"bluesky": {
|
||||||
|
"default": {
|
||||||
|
"color": "rgb(0, 133, 255)",
|
||||||
|
"background": "#0000",
|
||||||
|
"border": "#0000",
|
||||||
|
},
|
||||||
|
"hover": {
|
||||||
|
"color": "#fff",
|
||||||
|
"background": "#0000",
|
||||||
|
"border": "#0000"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"discord": {
|
||||||
|
"default": {
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"background": "#7289DA",
|
||||||
|
"border": "#7289DA",
|
||||||
|
},
|
||||||
|
"hover": {
|
||||||
|
"color": "#7289DA",
|
||||||
|
"background": "#FFFFFF",
|
||||||
|
"border": "#7289DA"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"linktree": {
|
||||||
|
"default": {
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"background": "#39e09b",
|
||||||
|
"border": "#39e09b",
|
||||||
|
},
|
||||||
|
"hover": {
|
||||||
|
"color": "#39e09b",
|
||||||
|
"background": "#FFFFFF",
|
||||||
|
"border": "#39e09b"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"carrd": {
|
||||||
|
"default": {
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"background": "#2C2F33",
|
||||||
|
"border": "#2C2F33",
|
||||||
|
},
|
||||||
|
"hover": {
|
||||||
|
"color": "#2C2F33",
|
||||||
|
"background": "#FFFFFF",
|
||||||
|
"border": "#2C2F33"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"dribbble": {
|
||||||
|
"default": {
|
||||||
|
"color": "#FFFFFF",
|
||||||
|
"background": "#EA4C89",
|
||||||
|
"border": "#EA4C89",
|
||||||
|
},
|
||||||
|
"hover": {
|
||||||
|
"color": "#EA4C89",
|
||||||
|
"background": "#FFFFFF",
|
||||||
|
"border": "#EA4C89"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constant {Object} buttonStyles - The button styles for the supported messaging apps
|
* @constant {Object} buttonStyles - The button styles for the supported messaging apps
|
||||||
*
|
*
|
||||||
@@ -1109,7 +1247,7 @@ const BskyExt = {
|
|||||||
let header = bio.closest("[data-testid='profileView']");
|
let header = bio.closest("[data-testid='profileView']");
|
||||||
|
|
||||||
// Get the profile header button group element
|
// Get the profile header button group element
|
||||||
let buttonGroup = header.querySelector('[role="button"]').parentElement;
|
let buttonGroup = header.querySelector("div.css-175oi2r.r-2llsf > div:nth-child(1) > div > div:nth-child(2) > div.css-175oi2r.r-12vffkv");
|
||||||
|
|
||||||
// Check if the profile header button group element exists
|
// Check if the profile header button group element exists
|
||||||
if (!buttonGroup) {
|
if (!buttonGroup) {
|
||||||
|
Reference in New Issue
Block a user