Unverified Commit b84f9c79 authored by Yohann Boniface's avatar Yohann Boniface Committed by GitHub
Browse files

spicetify-cli: 2.41.0 -> 2.42.0 (#445385)

parents 6f5244c2 cc8ade27
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -3,34 +3,31 @@
  buildGoModule,
  fetchFromGitHub,
  testers,
  replaceVars,
  spicetify-cli,
}:
buildGoModule (finalAttrs: {
  pname = "spicetify-cli";
  version = "2.41.0";
  version = "2.42.0";

  src = fetchFromGitHub {
    owner = "spicetify";
    repo = "cli";
    tag = "v${finalAttrs.version}";
    hash = "sha256-07++H76LBlfCcdm5uEpQrS5UMCZadLp1I6J4ZMaIPUo=";
    hash = "sha256-beMxE5ZpFqilgk4Xa0mvJyexDAFdwKUa1rJipFXBM7I=";
  };

  vendorHash = "sha256-W5i7R/maFvoouoSzPFEJMAp64H1Zsac24CiKuDt/cMY=";
  vendorHash = "sha256-UwZ5wtZ5akmn3GF93XAqJqr9mUfbFQTD/LU8YUeoaGA=";

  postPatch = ''
    substituteInPlace src/preprocess/preprocess.go \
      --replace-fail 'version != "Dev"' 'version != "${finalAttrs.version}"'
  '';

  ldflags = [
    "-s -w"
    "-X 'main.version=${finalAttrs.version}'"
  ];

  patches = [
    # Stops spicetify from attempting to fetch a newer css-map.json
    (replaceVars ./version.patch {
      inherit (finalAttrs) version;
    })
  ];

  postInstall =
    /*
      jsHelper and css-map.json are required at runtime
+0 −14
Original line number Diff line number Diff line
diff --git a/src/preprocess/preprocess.go b/src/preprocess/preprocess.go
index ac0f084..f38ece2 100644
--- a/src/preprocess/preprocess.go
+++ b/src/preprocess/preprocess.go
@@ -66,7 +66,7 @@ func Start(version string, extractedAppsPath string, flags Flag) {
 	var cssTranslationMap = make(map[string]string)
 	// readSourceMapAndGenerateCSSMap(appPath)
 
-	if version != "Dev" {
+	if version != "@version@" {
 		tag, err := FetchLatestTagMatchingOrMain(version)
 		if err != nil {
 			utils.PrintWarning("Cannot fetch version tag for CSS mappings")