Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a463f4234c | |||
| beb04101db | |||
| bf60e4265b | |||
| 42421bc57d | |||
| f64ee7b7e9 | |||
| 1fa29cf831 | |||
| 4861dd5d4a | |||
| 5614b723fd | |||
| 5e1e13b091 | |||
| 79ddb3ca92 | |||
| 684929edea | |||
| f02ec8c4ba | |||
| 5fd4ed9b0c | |||
| 003c295084 |
+11
@@ -121,3 +121,14 @@ start_moderation.sh
|
|||||||
gh_moderator.toml
|
gh_moderator.toml
|
||||||
moderator-data
|
moderator-data
|
||||||
hyfetch/git
|
hyfetch/git
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
target
|
||||||
|
.vscode
|
||||||
|
.idea
|
||||||
|
*.iml
|
||||||
|
*.egg-info
|
||||||
|
__pycache__
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
|
*.pyd
|
||||||
|
|||||||
Generated
+1
-1
@@ -251,7 +251,7 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hyfetch"
|
name = "hyfetch"
|
||||||
version = "2.0.1"
|
version = "2.0.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aho-corasick",
|
"aho-corasick",
|
||||||
"ansi_colours",
|
"ansi_colours",
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ resolver = "2"
|
|||||||
members = ["crates/*"]
|
members = ["crates/*"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "2.0.1"
|
version = "2.0.2"
|
||||||
authors = ["Azalea Gui <azalea@hydev.org>"]
|
authors = ["Azalea Gui <azalea@hydev.org>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.75.0"
|
rust-version = "1.75.0"
|
||||||
|
|||||||
@@ -129,6 +129,17 @@ cargo install --git https://github.com/hykilpikonna/hyfetch
|
|||||||
|
|
||||||
<!-- CHANGELOG STARTS HERE --->
|
<!-- CHANGELOG STARTS HERE --->
|
||||||
|
|
||||||
|
### 2.0.2
|
||||||
|
|
||||||
|
This is a small patch release that adds more flags and fixes some bugs from the recent Rust rewrite.
|
||||||
|
|
||||||
|
* 🏳️🌈 **New Flags**: Added new pride flags for Nullflux ([#397](https://github.com/hykilpikonna/hyfetch/pull/397)), Hypergender ([#422](https://github.com/hykilpikonna/hyfetch/pull/422)), Fictosexual ([#394](https://github.com/hykilpikonna/hyfetch/pull/394)), and Adipophilia ([#424](https://github.com/hykilpikonna/hyfetch/pull/424)).
|
||||||
|
* 🐛 **Bug Fixes**:
|
||||||
|
* Fixed a critical bug where custom `fastfetch` configurations could break hyfetch ([#420](https://github.com/hykilpikonna/hyfetch/pull/420)).
|
||||||
|
* Corrected the `nixos_small` ASCII logo to display properly ([#421](https://github.com/hykilpikonna/hyfetch/pull/421)).
|
||||||
|
* 🔧 **Improvements**:
|
||||||
|
* Improved a warning message for better clarity ([#419](https://github.com/hykilpikonna/hyfetch/issues/419)).
|
||||||
|
|
||||||
### 2.0.1
|
### 2.0.1
|
||||||
|
|
||||||
(changelog is generated by Gemini from commit history)
|
(changelog is generated by Gemini from commit history)
|
||||||
|
|||||||
@@ -486,13 +486,8 @@ pub fn get_distro_name(backend: Backend) -> Result<String> {
|
|||||||
match backend {
|
match backend {
|
||||||
Backend::Neofetch => run_neofetch_command_piped(&["ascii_distro_name"])
|
Backend::Neofetch => run_neofetch_command_piped(&["ascii_distro_name"])
|
||||||
.context("failed to get distro name from neofetch"),
|
.context("failed to get distro name from neofetch"),
|
||||||
Backend::Fastfetch => Ok(run_fastfetch_command_piped(&[
|
Backend::Fastfetch => Ok(run_fastfetch_command_piped(&["--logo", "none", "-c", "none", "-s", "OS",])
|
||||||
"--logo",
|
.context("failed to get distro name from fastfetch")?.replace("OS: ", "")),
|
||||||
"none",
|
|
||||||
"-s",
|
|
||||||
"OS",
|
|
||||||
"--disable-linewrap",
|
|
||||||
]).context("failed to get distro name from fastfetch")?.replace("OS: ", "")),
|
|
||||||
#[cfg(feature = "macchina")]
|
#[cfg(feature = "macchina")]
|
||||||
Backend::Macchina => {
|
Backend::Macchina => {
|
||||||
// Write ascii art to temp file
|
// Write ascii art to temp file
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ pub enum Preset {
|
|||||||
|
|
||||||
Aromantic,
|
Aromantic,
|
||||||
|
|
||||||
|
Fictosexual,
|
||||||
|
|
||||||
Aroace1,
|
Aroace1,
|
||||||
|
|
||||||
Aroace2,
|
Aroace2,
|
||||||
@@ -111,6 +113,10 @@ pub enum Preset {
|
|||||||
|
|
||||||
Genderflux,
|
Genderflux,
|
||||||
|
|
||||||
|
Nullflux,
|
||||||
|
|
||||||
|
Hypergender, Hyperboy, Hypergirl, Hyperandrogyne, Hyperneutrois,
|
||||||
|
|
||||||
Finsexual,
|
Finsexual,
|
||||||
|
|
||||||
Unlabeled1,
|
Unlabeled1,
|
||||||
@@ -165,6 +171,8 @@ pub enum Preset {
|
|||||||
|
|
||||||
Twink,
|
Twink,
|
||||||
|
|
||||||
|
Adipophilia,
|
||||||
|
|
||||||
Kenochoric,
|
Kenochoric,
|
||||||
|
|
||||||
Veldian,
|
Veldian,
|
||||||
@@ -304,6 +312,11 @@ impl Preset {
|
|||||||
"#3BA740", "#A8D47A", "#FFFFFF", "#ABABAB", "#000000",
|
"#3BA740", "#A8D47A", "#FFFFFF", "#ABABAB", "#000000",
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
// https://orientation.fandom.com/wiki/Fictosexual
|
||||||
|
Self::Fictosexual => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#000000", "#C4C4C4", "#A349A5", "#C4C4C4", "#000000",
|
||||||
|
]),
|
||||||
|
|
||||||
// sourced from https://flag.library.lgbt/flags/aroace/
|
// sourced from https://flag.library.lgbt/flags/aroace/
|
||||||
Self::Aroace1 => ColorProfile::from_hex_colors(vec![
|
Self::Aroace1 => ColorProfile::from_hex_colors(vec![
|
||||||
"#E28C00", "#ECCD00", "#FFFFFF", "#62AEDC", "#203856",
|
"#E28C00", "#ECCD00", "#FFFFFF", "#62AEDC", "#203856",
|
||||||
@@ -433,6 +446,30 @@ impl Preset {
|
|||||||
"f47694", "f2a2b9", "cecece", "7ce0f7", "3ecdf9", "fff48d",
|
"f47694", "f2a2b9", "cecece", "7ce0f7", "3ecdf9", "fff48d",
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
Self::Nullflux => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#0B0C0E", "#A28DB9", "#E1D4EF", "#F0E6DD", "#665858",
|
||||||
|
]),
|
||||||
|
|
||||||
|
Self::Hypergender => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#EFEFEF", "#FFFFFF", "#FBFF75", "#000000", "#FBFF75", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
|
||||||
|
Self::Hyperboy => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#EFEFEF", "#FFFFFF", "#74D7FE", "#000000", "#74D7FE", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
|
||||||
|
Self::Hypergirl => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#EFEFEF", "#FFFFFF", "#FC76D3", "#000000", "#FC76D3", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
|
||||||
|
Self::Hyperandrogyne => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#EFEFEF", "#FFFFFF", "#BB83FF", "#000000", "#BB83FF", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
|
||||||
|
Self::Hyperneutrois => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#EFEFEF", "#FFFFFF", "#BAFA74", "#000000", "#BAFA74", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
|
||||||
// sourced from https://lgbtqia.wiki/wiki/Finsexual
|
// sourced from https://lgbtqia.wiki/wiki/Finsexual
|
||||||
Self::Finsexual => ColorProfile::from_hex_colors(vec![
|
Self::Finsexual => ColorProfile::from_hex_colors(vec![
|
||||||
"#B18EDF", "#D7B1E2", "#F7CDE9", "#F39FCE", "#EA7BB3",
|
"#B18EDF", "#D7B1E2", "#F7CDE9", "#F39FCE", "#EA7BB3",
|
||||||
@@ -543,6 +580,11 @@ impl Preset {
|
|||||||
// colorpicked from https://commons.wikimedia.org/wiki/File:Twink_Pride_Flag_(proposed).svg
|
// colorpicked from https://commons.wikimedia.org/wiki/File:Twink_Pride_Flag_(proposed).svg
|
||||||
Self::Twink => ColorProfile::from_hex_colors(vec!["#FFB2FF", "#FFFFFF", "#FFFF81"]),
|
Self::Twink => ColorProfile::from_hex_colors(vec!["#FFB2FF", "#FFFFFF", "#FFFF81"]),
|
||||||
|
|
||||||
|
// https://en.wikipedia.org/wiki/File:FatFetishFlag.png
|
||||||
|
Self::Adipophilia => ColorProfile::from_hex_colors(vec![
|
||||||
|
"#000000", "#E16180", "#FFF9BE", "#603E41", "#000000",
|
||||||
|
]),
|
||||||
|
|
||||||
Self::Kenochoric => {
|
Self::Kenochoric => {
|
||||||
ColorProfile::from_hex_colors(vec!["#000000", "#2E1569", "#824DB7", "#C7A1D6"])
|
ColorProfile::from_hex_colors(vec!["#000000", "#2E1569", "#824DB7", "#C7A1D6"])
|
||||||
},
|
},
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||||
.TH VERSION: "1" "August 2025" "Version: 2.0.1" "User Commands"
|
.TH VERSION: "1" "September 2025" "Version: 2.0.2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Version: \- manual page for Version: 2.0.1
|
Version: \- manual page for Version: 2.0.2
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B hyfetch
|
.B hyfetch
|
||||||
[\fI\,-c\/\fR] [\fI\,-C=CONFIG_FILE\/\fR] [\fI\,-p=PRESET\/\fR] [\fI\,-m=MODE\/\fR] [\fI\,-b=BACKEND\/\fR] [\fI\,--args=ARGS\/\fR] [\fI\,--c-scale=\/\fR
|
[\fI\,-c\/\fR] [\fI\,-C=CONFIG_FILE\/\fR] [\fI\,-p=PRESET\/\fR] [\fI\,-m=MODE\/\fR] [\fI\,-b=BACKEND\/\fR] [\fI\,--args=ARGS\/\fR] [\fI\,--c-scale=\/\fR
|
||||||
@@ -21,7 +21,7 @@ Use another config file
|
|||||||
.TP
|
.TP
|
||||||
\fB\-p\fR, \fB\-\-preset\fR=\fI\,PRESET\/\fR
|
\fB\-p\fR, \fB\-\-preset\fR=\fI\,PRESET\/\fR
|
||||||
Use preset
|
Use preset
|
||||||
PRESET={rainbow,transgender,nonbinary,xenogender,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay\-men,lesbian,abrosexual,asexual,aromantic,aroace1,aroace2,aroace3,greysexual,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,autoromantic,boyflux2,girlflux,genderflux,finsexual,unlabeled1,unlabeled2,pangender,pangender.contrast,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman\-unity,caninekin,plural,fraysexual,bear,butch,leather,otter,twink,kenochoric,veldian,solian,lunian,polyam,sapphic,androgyne,interprogress,progress,intersex,old\-polyam,equal\-rights,drag,pronounfluid,pronounflux,exipronoun,neopronoun,neofluid,genderqueer,cisgender,baker,beiyang,burger,throatlozenges,band,random}
|
PRESET={rainbow,transgender,nonbinary,xenogender,agender,queer,genderfluid,bisexual,pansexual,polysexual,omnisexual,omniromantic,gay\-men,lesbian,abrosexual,asexual,aromantic,fictosexual,aroace1,aroace2,aroace3,greysexual,autosexual,intergender,greygender,akiosexual,bigender,demigender,demiboy,demigirl,transmasculine,transfeminine,genderfaun,demifaun,genderfae,demifae,neutrois,biromantic1,autoromantic,boyflux2,girlflux,genderflux,nullflux,hypergender,hyperboy,hypergirl,hyperandrogyne,hyperneutrois,finsexual,unlabeled1,unlabeled2,pangender,pangender.contrast,gendernonconforming1,gendernonconforming2,femboy,tomboy,gynesexual,androsexual,gendervoid,voidgirl,voidboy,nonhuman\-unity,caninekin,plural,fraysexual,bear,butch,leather,otter,twink,adipophilia,kenochoric,veldian,solian,lunian,polyam,sapphic,androgyne,interprogress,progress,intersex,old\-polyam,equal\-rights,drag,pronounfluid,pronounflux,exipronoun,neopronoun,neofluid,genderqueer,cisgender,baker,beiyang,burger,throatlozenges,band,random}
|
||||||
.TP
|
.TP
|
||||||
\fB\-m\fR, \fB\-\-mode\fR=\fI\,MODE\/\fR
|
\fB\-m\fR, \fB\-\-mode\fR=\fI\,MODE\/\fR
|
||||||
Color mode MODE={8bit,rgb}
|
Color mode MODE={8bit,rgb}
|
||||||
|
|||||||
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
|
||||||
.TH NEOFETCH "1" "August 2025" "Neofetch 8.0.1" "User Commands"
|
.TH NEOFETCH "1" "September 2025" "Neofetch 8.0.2" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
Neofetch \- manual page for Neofetch 8.0.1
|
Neofetch \- manual page for Neofetch 8.0.2
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B neofetch
|
.B neofetch
|
||||||
\fI\,func_name --option "value" --option "value"\/\fR
|
\fI\,func_name --option "value" --option "value"\/\fR
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
VERSION = '2.0.1'
|
VERSION = '2.0.2'
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
from . import AsciiArt
|
from . import AsciiArt
|
||||||
|
|
||||||
nixos_small = AsciiArt(match=r'''"nixos_small"''', color='4 6', ascii=r"""
|
nixos_small = AsciiArt(match=r'''"nixos_small"''', color='4 6', ascii=r"""
|
||||||
${c1} \\ \\ //
|
${c1} \\ \\ //
|
||||||
==\\__\\/ //
|
==\\__\\/ //
|
||||||
// \\//
|
// \\//
|
||||||
==// //==
|
==// //==
|
||||||
|
|||||||
+1
-1
@@ -382,7 +382,7 @@ def run():
|
|||||||
GLOBAL_CFG.use_overlay = args.overlay
|
GLOBAL_CFG.use_overlay = args.overlay
|
||||||
|
|
||||||
if args.version:
|
if args.version:
|
||||||
print(f'Version is {VERSION}')
|
print(f'Version is 1.99.∞\n(python hyfetch legacy mode)')
|
||||||
return
|
return
|
||||||
|
|
||||||
# Ensure git bash for windows
|
# Ensure git bash for windows
|
||||||
|
|||||||
@@ -301,6 +301,9 @@ PRESETS: dict[str, ColorProfile] = {
|
|||||||
'#000000'
|
'#000000'
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
# https://orientation.fandom.com/wiki/Fictosexual
|
||||||
|
'fictosexual': ColorProfile(["#000000", "#C4C4C4", "#A349A5", "#C4C4C4", "#000000"]),
|
||||||
|
|
||||||
# aroace1 sourced from https://flag.library.lgbt/flags/aroace/
|
# aroace1 sourced from https://flag.library.lgbt/flags/aroace/
|
||||||
'aroace1': ColorProfile([
|
'aroace1': ColorProfile([
|
||||||
'#E28C00',
|
'#E28C00',
|
||||||
@@ -551,6 +554,27 @@ PRESETS: dict[str, ColorProfile] = {
|
|||||||
"fff48d",
|
"fff48d",
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
# https://lgbtqia.wiki/wiki/Gendernull
|
||||||
|
'nullflux': ColorProfile([
|
||||||
|
'#0B0C0E', '#A28DB9', '#E1D4EF', '#F0E6DD', '#665858',
|
||||||
|
]),
|
||||||
|
|
||||||
|
'hypergender': ColorProfile([
|
||||||
|
"#EFEFEF", "#FFFFFF", "#FBFF75", "#000000", "#FBFF75", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
'hyperboy': ColorProfile([
|
||||||
|
"#EFEFEF", "#FFFFFF", "#74D7FE", "#000000", "#74D7FE", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
'hypergirl': ColorProfile([
|
||||||
|
"#EFEFEF", "#FFFFFF", "#FC76D3", "#000000", "#FC76D3", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
'hyperandrogyne': ColorProfile([
|
||||||
|
"#EFEFEF", "#FFFFFF", "#BB83FF", "#000000", "#BB83FF", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
'hyperneutrois': ColorProfile([
|
||||||
|
"#EFEFEF", "#FFFFFF", "#BAFA74", "#000000", "#BAFA74", "#FFFFFF", "#EFEFEF",
|
||||||
|
]),
|
||||||
|
|
||||||
"finsexual": ColorProfile([
|
"finsexual": ColorProfile([
|
||||||
"#B18EDF",
|
"#B18EDF",
|
||||||
"#D7B1E2",
|
"#D7B1E2",
|
||||||
@@ -752,6 +776,9 @@ PRESETS: dict[str, ColorProfile] = {
|
|||||||
'#FFFF81',
|
'#FFFF81',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
# https://en.wikipedia.org/wiki/File:FatFetishFlag.png
|
||||||
|
'adipophilia': ColorProfile(["#000000", "#E16180", "#FFF9BE", "#603E41", "#000000"]),
|
||||||
|
|
||||||
'kenochoric': ColorProfile([
|
'kenochoric': ColorProfile([
|
||||||
'#000000',
|
'#000000',
|
||||||
'#2E1569',
|
'#2E1569',
|
||||||
|
|||||||
+4
-1
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -12,7 +13,9 @@ def run_rust():
|
|||||||
pd = Path(__file__).parent.joinpath('rust')
|
pd = Path(__file__).parent.joinpath('rust')
|
||||||
pd = pd.joinpath('hyfetch.exe' if platform.system() == 'Windows' else 'hyfetch')
|
pd = pd.joinpath('hyfetch.exe' if platform.system() == 'Windows' else 'hyfetch')
|
||||||
if not pd.exists():
|
if not pd.exists():
|
||||||
printc('&cThe rust executable is not found, falling back to python...')
|
if 'HYFETCH_DONT_WARN_RUST' not in os.environ:
|
||||||
|
printc('&cThe executable for hyfetch v2 (rust) is not found, falling back to legacy v1.99.∞ (python).\n'
|
||||||
|
'You can add environment variable HYFETCH_DONT_WARN_RUST=1 to suppress this warning.\n')
|
||||||
run_py()
|
run_py()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
version=8.0.1
|
version=8.0.2
|
||||||
|
|
||||||
# Fallback to a value of '5' for shells which support bash
|
# Fallback to a value of '5' for shells which support bash
|
||||||
# but do not set the 'BASH_' shell variables (osh).
|
# but do not set the 'BASH_' shell variables (osh).
|
||||||
@@ -12126,7 +12126,7 @@ EOF
|
|||||||
"nixos_small")
|
"nixos_small")
|
||||||
set_colors 4 6
|
set_colors 4 6
|
||||||
read -rd '' ascii_data <<'EOF'
|
read -rd '' ascii_data <<'EOF'
|
||||||
${c1} \\\\ \\\\ //
|
${c1} \\\\ \\\\ //
|
||||||
==\\\\__\\\\/ //
|
==\\\\__\\\\/ //
|
||||||
// \\\\//
|
// \\\\//
|
||||||
==// //==
|
==// //==
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "neowofetch",
|
"name": "neowofetch",
|
||||||
"version": "2.0.1",
|
"version": "2.0.2",
|
||||||
"description": "Updated neofetch",
|
"description": "Updated neofetch",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
+15
-3
@@ -52,7 +52,14 @@ def edit_versions(version: str):
|
|||||||
content = [f"VERSION = '{version}'" if l.startswith('VERSION = ') else l for l in path.read_text().split('\n')]
|
content = [f"VERSION = '{version}'" if l.startswith('VERSION = ') else l for l in path.read_text().split('\n')]
|
||||||
path.write_text('\n'.join(content))
|
path.write_text('\n'.join(content))
|
||||||
|
|
||||||
# 3. README.md
|
# 3. Cargo.toml
|
||||||
|
print('Editing Cargo.toml...')
|
||||||
|
path = Path('Cargo.toml')
|
||||||
|
content = path.read_text()
|
||||||
|
content = re.sub(r'(?<=^version = ")[^"]+(?="$)', version, content, flags=re.MULTILINE)
|
||||||
|
path.write_text(content)
|
||||||
|
|
||||||
|
# 4. README.md
|
||||||
print('Editing README.md...')
|
print('Editing README.md...')
|
||||||
path = Path('README.md')
|
path = Path('README.md')
|
||||||
content = path.read_text()
|
content = path.read_text()
|
||||||
@@ -61,7 +68,7 @@ def edit_versions(version: str):
|
|||||||
content = content[:changelog_i] + f'\n\n### {version}' + content[changelog_i:]
|
content = content[:changelog_i] + f'\n\n### {version}' + content[changelog_i:]
|
||||||
path.write_text(content)
|
path.write_text(content)
|
||||||
|
|
||||||
# 4. neofetch script
|
# 5. neofetch script
|
||||||
print('Editing neofetch...')
|
print('Editing neofetch...')
|
||||||
path = Path('neofetch')
|
path = Path('neofetch')
|
||||||
lines = path.read_text().replace("\t", " ").split('\n')
|
lines = path.read_text().replace("\t", " ").split('\n')
|
||||||
@@ -125,7 +132,12 @@ def create_release(v: str):
|
|||||||
subprocess.check_call(['git', 'tag', f'neofetch-{NEOFETCH_NEW_VERSION}'])
|
subprocess.check_call(['git', 'tag', f'neofetch-{NEOFETCH_NEW_VERSION}'])
|
||||||
|
|
||||||
i = input('Please check the commit is correct. Press y to continue or any other key to cancel.')
|
i = input('Please check the commit is correct. Press y to continue or any other key to cancel.')
|
||||||
assert i == 'y'
|
if i.lower() != 'y':
|
||||||
|
print('Aborting...')
|
||||||
|
subprocess.check_call(['git', 'reset', '--hard', 'HEAD~1'])
|
||||||
|
subprocess.check_call(['git', 'tag', '-d', v])
|
||||||
|
subprocess.check_call(['git', 'tag', '-d', f'neofetch-{NEOFETCH_NEW_VERSION}'])
|
||||||
|
exit(1)
|
||||||
|
|
||||||
# 4. Push
|
# 4. Push
|
||||||
print('Pushing commits...')
|
print('Pushing commits...')
|
||||||
|
|||||||
Reference in New Issue
Block a user