Skip to content

Commit

Permalink
feat: drop spicetify- from name & move to main (spicetify#3033)
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsojramos authored May 20, 2024
1 parent e23e0f2 commit ffc2350
Show file tree
Hide file tree
Showing 26 changed files with 59 additions and 58 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Executables
bin
spicetify-cli
cli
spicetify
spicetify-cli
*.exe

# MacOS
Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

> If you want to ask a question, we assume that you have read the available [Documentation](https://spicetify.app/docs/getting-started/).
Before you ask a question, it is best to search for existing [issues](https://github.com/spicetify/spicetify-cli/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
Before you ask a question, it is best to search for existing [issues](https://github.com/spicetify/cli/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.

If you then still feel the need to ask a question and need clarification, we recommend the following:

- Open an [issue](https://github.com/spicetify/spicetify-cli/issues/new).
- Open an [issue](https://github.com/spicetify/cli/issues/new).
- Provide both Spicetify and Spotify version.
- Explain what the problem is.

Expand All @@ -37,14 +37,14 @@ A good bug report shouldn't leave others needing to chase you up for more inform

- Make sure that you are using the latest version.
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://spicetify.app/docs/getting-started/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/spicetify/spicetify-cli/labels/%F0%9F%90%9B%20bug).
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/spicetify/cli/labels/%F0%9F%90%9B%20bug).

#### How Do I Submit a Good Bug Report?

We use GitHub issues to track bugs and errors. If you run into an issue with the project:

- Open an [issue](https://github.com/spicetify/spicetify-cli/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Use the provided [bug template](https://github.com/spicetify/spicetify-cli/issues/new?assignees=&labels=%F0%9F%90%9B+bug&projects=&template=bug_report.yml).
- Open an [issue](https://github.com/spicetify/cli/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
- Use the provided [bug template](https://github.com/spicetify/cli/issues/new?assignees=&labels=%F0%9F%90%9B+bug&projects=&template=bug_report.yml).
- Explain the behavior you would expect and the actual behavior.
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
- Provide the information you collected in the previous section.
Expand All @@ -57,12 +57,12 @@ This section guides you through submitting an enhancement suggestion for spiceti

- Make sure that you are using the latest version.
- Read the [documentation](https://spicetify.app/docs/getting-started/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](https://github.com/spicetify/spicetify-cli/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Perform a [search](https://github.com/spicetify/cli/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.

#### How Do I Submit a Good Enhancement Suggestion?

Enhancement suggestions are tracked as [GitHub issues](https://github.com/spicetify/spicetify-cli/issues). Create an enhancement suggestion using the provided [feature request template](https://github.com/spicetify/spicetify-cli/issues/new?assignees=&labels=%E2%9C%A8+feature&projects=&template=feature_request.yml).
Enhancement suggestions are tracked as [GitHub issues](https://github.com/spicetify/cli/issues). Create an enhancement suggestion using the provided [feature request template](https://github.com/spicetify/cli/issues/new?assignees=&labels=%E2%9C%A8+feature&projects=&template=feature_request.yml).

- Use a **clear and descriptive title** for the issue to identify the suggestion.
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
Expand All @@ -79,16 +79,16 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/spicet
#### Environment Setup and Development

Follow the steps outlined in the [documentation](https://spicetify.app/docs/development/compiling) or the steps below.
1. Clone the repository using `git clone https://github.com/spicetify/spicetify-cli`.
1. Clone the repository using `git clone https://github.com/spicetify/cli`.
2. Enter the repository directory and build the project.
* Windows
```
cd spicetify-cli
cd cli
go build -o spicetify.exe
```
* Linux and MacOS
```
cd spicetify-cli
cd cli
go build -o spicetify
```
3. Execute the executable file generated by `go build` using `./spicetify` or `./spicetify.exe`.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<h3 align="center"><a href="https://spicetify.app/"><img src="https://i.imgur.com/iwcLITQ.png" width="600px"></a></h3>
<p align="center">
<a href="https://goreportcard.com/report/github.com/spicetify/spicetify-cli"><img src="https://goreportcard.com/badge/github.com/spicetify/spicetify-cli"></a>
<a href="https://github.com/spicetify/spicetify-cli/releases/latest"><img src="https://img.shields.io/github/release/spicetify/spicetify-cli/all.svg?colorB=97CA00?label=version"></a>
<a href="https://github.com/spicetify/spicetify-cli/releases"><img src="https://img.shields.io/github/downloads/spicetify/spicetify-cli/total.svg?colorB=97CA00"></a>
<a href="https://goreportcard.com/report/github.com/spicetify/cli"><img src="https://goreportcard.com/badge/github.com/spicetify/cli"></a>
<a href="https://github.com/spicetify/cli/releases/latest"><img src="https://img.shields.io/github/release/spicetify/cli/all.svg?colorB=97CA00?label=version"></a>
<a href="https://github.com/spicetify/cli/releases"><img src="https://img.shields.io/github/downloads/spicetify/cli/total.svg?colorB=97CA00"></a>
<a href="https://discord.gg/VnevqPp2Rr"><img src="https://img.shields.io/discord/842219447716151306?label=chat&logo=discord&logoColor=discord"></a>
<a href="https://www.reddit.com/r/spicetify"><img src="https://img.shields.io/reddit/subreddit-subscribers/spicetify?logo=reddit"></a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true,
"defaultBranch": "master"
"defaultBranch": "main"
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/spicetify/spicetify-cli
module github.com/spicetify/cli

go 1.21

Expand Down
4 changes: 2 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function Get-Spicetify {
}
else {
Write-Host -Object 'Fetching the latest spicetify version...' -NoNewline
$latestRelease = Invoke-RestMethod -Uri 'https://api.github.com/repos/spicetify/spicetify-cli/releases/latest'
$latestRelease = Invoke-RestMethod -Uri 'https://api.github.com/repos/spicetify/cli/releases/latest'
$targetVersion = $latestRelease.tag_name -replace 'v', ''
Write-Success
}
Expand All @@ -94,7 +94,7 @@ function Get-Spicetify {
process {
Write-Host -Object "Downloading spicetify v$targetVersion..." -NoNewline
$Parameters = @{
Uri = "https://github.com/spicetify/spicetify-cli/releases/download/v$targetVersion/spicetify-$targetVersion-windows-$architecture.zip"
Uri = "https://github.com/spicetify/cli/releases/download/v$targetVersion/spicetify-$targetVersion-windows-$architecture.zip"
UseBasicParsin = $true
OutFile = $archivePath
}
Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ command -v tar >/dev/null || { log "tar isn't installed!" >&2; exit 1; }
command -v grep >/dev/null || { log "grep isn't installed!" >&2; exit 1; }

# download uri
releases_uri=https://github.com/spicetify/spicetify-cli/releases
releases_uri=https://github.com/spicetify/cli/releases
if [ -z "$tag" ]; then
tag=$(curl -LsH 'Accept: application/json' $releases_uri/latest)
tag=${tag%\,\"update_url*}
Expand Down
2 changes: 1 addition & 1 deletion jsHelper/spicetifyWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2391,7 +2391,7 @@ Spicetify.Playbar = (() => {
// Fetch latest version from GitHub
try {
let changelog;
const res = await fetch("https://api.github.com/repos/spicetify/spicetify-cli/releases/latest");
const res = await fetch("https://api.github.com/repos/spicetify/cli/releases/latest");
const { tag_name, html_url, body } = await res.json();
const semver = tag_name.slice(1);
const changelogRawDataOld = body.match(/## What's Changed([\s\S]*?)\r\n\r/)?.[1];
Expand Down
10 changes: 5 additions & 5 deletions spicetify.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"sync"

colorable "github.com/mattn/go-colorable"
"github.com/spicetify/spicetify-cli/src/cmd"
spotifystatus "github.com/spicetify/spicetify-cli/src/status/spotify"
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/cmd"
spotifystatus "github.com/spicetify/cli/src/status/spotify"
"github.com/spicetify/cli/src/utils"
)

var (
Expand Down Expand Up @@ -444,7 +444,7 @@ upgrade|update Update spicetify latest version
When using the "watch" command, any combination of the style (-s), extension (-e), and app (-a) flags can be used (ex. "watch -s -e" or "watch -e -a").
For config information, run "spicetify -h config".
For more information and bug report: https://github.com/spicetify/spicetify-cli/`)
For more information and bug report: https://github.com/spicetify/cli/`)
}

func helpConfig() {
Expand Down Expand Up @@ -481,7 +481,7 @@ always_enable_devtools <0 | 1>
Whether Chrome DevTools is enabled when launching/restarting Spotify.
check_spicetify_update <0 | 1>
Whether to check for spicetify-cli update when running Spicetify.
Whether to check for CLI update when running Spicetify.
` + utils.Bold("[Preprocesses]") + `
disable_sentry <0 | 1>
Expand Down
2 changes: 1 addition & 1 deletion src/apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"strings"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// Flag enables/disables additional feature
Expand Down
2 changes: 1 addition & 1 deletion src/backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"path/filepath"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// Start backing up Spotify Apps folder to backupPath
Expand Down
8 changes: 4 additions & 4 deletions src/cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"path/filepath"
"strings"

"github.com/spicetify/spicetify-cli/src/apply"
backupstatus "github.com/spicetify/spicetify-cli/src/status/backup"
spotifystatus "github.com/spicetify/spicetify-cli/src/status/spotify"
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/apply"
backupstatus "github.com/spicetify/cli/src/status/backup"
spotifystatus "github.com/spicetify/cli/src/status/spotify"
"github.com/spicetify/cli/src/utils"
)

// Apply .
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/auto.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"os"

backupstatus "github.com/spicetify/spicetify-cli/src/status/backup"
spotifystatus "github.com/spicetify/spicetify-cli/src/status/spotify"
backupstatus "github.com/spicetify/cli/src/status/backup"
spotifystatus "github.com/spicetify/cli/src/status/spotify"
)

// Auto checks Spotify state, re-backup and apply if needed, then launch
Expand Down
10 changes: 5 additions & 5 deletions src/cmd/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"log"
"os"

spotifystatus "github.com/spicetify/spicetify-cli/src/status/spotify"
spotifystatus "github.com/spicetify/cli/src/status/spotify"

"github.com/spicetify/spicetify-cli/src/backup"
"github.com/spicetify/spicetify-cli/src/preprocess"
backupstatus "github.com/spicetify/spicetify-cli/src/status/backup"
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/backup"
"github.com/spicetify/cli/src/preprocess"
backupstatus "github.com/spicetify/cli/src/status/backup"
"github.com/spicetify/cli/src/utils"
)

// Backup stores original apps packages, extracts them and preprocesses
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/go-ini/ini"
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/color.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"

"github.com/go-ini/ini"
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/config-dir.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// ShowConfigDirectory shows config directory in user's default file manager application
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"

"github.com/go-ini/ini"
"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// EditConfig changes one or multiple config value
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/devtools.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"runtime"
"strings"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// SetDevTool enables/disables developer mode of Spotify client
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"regexp"
"strings"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

func Patch() {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"path/filepath"
"strings"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// ThemeAssetPath returns path of theme; assets, color.ini, theme.js and user.css
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"path/filepath"
"runtime"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

func Update(currentVersion string) bool {
Expand All @@ -28,7 +28,7 @@ func Update(currentVersion string) bool {
return false
}

var assetURL string = "https://github.com/spicetify/spicetify-cli/releases/download/v" + tagName + "/spicetify-" + tagName
var assetURL string = "https://github.com/spicetify/cli/releases/download/v" + tagName + "/spicetify-" + tagName
var location string
switch runtime.GOOS {
case "windows":
Expand Down
4 changes: 2 additions & 2 deletions src/cmd/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"
"time"

spotifystatus "github.com/spicetify/spicetify-cli/src/status/spotify"
"github.com/spicetify/spicetify-cli/src/utils"
spotifystatus "github.com/spicetify/cli/src/status/spotify"
"github.com/spicetify/cli/src/utils"
)

var (
Expand Down
14 changes: 7 additions & 7 deletions src/preprocess/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"strconv"
"strings"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

// Flag enables/disables preprocesses to be applied
Expand All @@ -29,7 +29,7 @@ type Flag struct {
}

func readRemoteCssMap(tag string, cssTranslationMap *map[string]string) error {
var cssMapURL string = "https://raw.githubusercontent.com/spicetify/spicetify-cli/" + tag + "/css-map.json"
var cssMapURL string = "https://raw.githubusercontent.com/spicetify/cli/" + tag + "/css-map.json"
cssMapResp, err := http.Get(cssMapURL)
if err != nil {
return err
Expand Down Expand Up @@ -66,7 +66,7 @@ func Start(version string, extractedAppsPath string, flags Flag) {
// readSourceMapAndGenerateCSSMap(appPath)

if version != "Dev" {
tag, err := FetchLatestTagMatchingOrMaster(version)
tag, err := FetchLatestTagMatchingOrMain(version)
if err != nil {
utils.PrintWarning("Cannot fetch version tag for CSS mappings")
fmt.Printf("err: %v\n", err)
Expand Down Expand Up @@ -671,7 +671,7 @@ func splitVersion(version string) ([3]int, error) {
return vInts, nil
}

func FetchLatestTagMatchingOrMaster(version string) (string, error) {
func FetchLatestTagMatchingOrMain(version string) (string, error) {
tag, err := utils.FetchLatestTag()
if err != nil {
return "", err
Expand All @@ -684,9 +684,9 @@ func FetchLatestTagMatchingOrMaster(version string) (string, error) {
if err != nil {
return "", err
}
// major version matches latest, use master branch
// major version matches latest, use main branch
if ver[0] == versionS[0] && ver[1] == versionS[1] {
return "master", nil
return "main", nil
} else {
return FetchLatestTagMatchingVersion(version)
}
Expand All @@ -696,7 +696,7 @@ func FetchLatestTagMatchingVersion(version string) (string, error) {
if version == "Dev" {
return "Dev", nil
}
res, err := http.Get("https://api.github.com/repos/spicetify/spicetify-cli/releases")
res, err := http.Get("https://api.github.com/repos/spicetify/cli/releases")
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion src/status/backup/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

"github.com/spicetify/spicetify-cli/src/utils"
"github.com/spicetify/cli/src/utils"
)

type status struct {
Expand Down
2 changes: 1 addition & 1 deletion src/utils/vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type GithubRelease struct {
}

func FetchLatestTag() (string, error) {
res, err := http.Get("https://api.github.com/repos/spicetify/spicetify-cli/releases/latest")
res, err := http.Get("https://api.github.com/repos/spicetify/cli/releases/latest")
if err != nil {
return "", err
}
Expand Down

0 comments on commit ffc2350

Please sign in to comment.