Skip to content

Commit

Permalink
chore: rename packages to org name
Browse files Browse the repository at this point in the history
  • Loading branch information
bhunter234 committed Aug 31, 2024
1 parent c7917fe commit 5fd4105
Show file tree
Hide file tree
Showing 42 changed files with 157 additions and 152 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
tags:
- "*"

permissions: write-all
permissions:
packages: write
contents: read
attestations: write
id-token: write

jobs:
goreleaser:
Expand Down Expand Up @@ -34,14 +38,15 @@ jobs:

- name: Build UI
run: |
git clone https://github.com/divyam234/teldrive-ui
git clone https://github.com/tgdrive/teldrive-ui
cd teldrive-ui
pnpm install --frozen-lockfile
export VITE_SERVER_VERSION=$GITHUB_REF_NAME
pnpm run build
cd ..
mv teldrive-ui/dist ui/dist
rm -rf teldrive-ui
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
18 changes: 9 additions & 9 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,30 @@ archives:
- LICENSE
dockers:
- image_templates:
- "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-amd64"
use: buildx
dockerfile: goreleaser.dockerfile
build_flag_templates:
- "--platform=linux/amd64"

- image_templates:
- "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "ghcr.io/divyam234/{{ .ProjectName }}:latest"
- "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "ghcr.io/tgdrive/{{ .ProjectName }}:latest"
use: buildx
dockerfile: goreleaser.dockerfile
goarch: arm64
build_flag_templates:
- --platform=linux/arm64/v8

docker_manifests:
- name_template: "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}"
- name_template: "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}"
image_templates:
- "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-arm64"
- name_template: "ghcr.io/divyam234/{{ .ProjectName }}:latest"
- "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-arm64"
- name_template: "ghcr.io/tgdrive/{{ .ProjectName }}:latest"
image_templates:
- "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/divyam234/{{ .ProjectName }}:{{ .Tag }}-arm64"
- "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-amd64"
- "ghcr.io/tgdrive/{{ .ProjectName }}:{{ .Tag }}-arm64"

changelog:
sort: asc
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ endif
APP_NAME := teldrive
BUILD_DIR := bin
FRONTEND_DIR := ui/dist
FRONTEND_ASSET := https://github.com/divyam234/teldrive-ui/releases/download/v1/teldrive-ui.zip
FRONTEND_ASSET := https://github.com/tgdrive/teldrive-ui/releases/download/v1/teldrive-ui.zip
GIT_TAG := $(shell git describe --tags --abbrev=0)
GIT_COMMIT := $(shell git rev-parse --short HEAD)
GIT_LINK := $(shell git remote get-url origin)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Telegram Drive is a powerful utility that enables you to organise your telegram

<br>

[UI Repo ](https://github.com/divyam234/teldrive-ui)
[UI Repo ](https://github.com/tgdrive/teldrive-ui)

[UI Library ](https://github.com/divyam234/tw-material)

Expand All @@ -47,19 +47,19 @@ Telegram Drive is a powerful utility that enables you to organise your telegram
#### Linux

```bash
curl -sSL https://instl.vercel.app/divyam234/teldrive/linux | bash
curl -sSL https://instl.vercel.app/tgdrive/teldrive/linux | bash
```

#### Windows

```powershell
iwr https://instl.vercel.app/divyam234/teldrive/windows | iex
iwr https://instl.vercel.app/tgdrive/teldrive/windows | iex
```

#### macOS

```bash
curl -sSL https://instl.vercel.app/divyam234/teldrive/macos | bash
curl -sSL https://instl.vercel.app/tgdrive/teldrive/macos | bash
```
### Deploy using docker-compose

Expand Down Expand Up @@ -128,7 +128,7 @@ teldrive run --tg-app-id="" --tg-app-hash="" --jwt-secret="" --db-data-source=""
- Default Channel can be selected through UI. Make sure to set it from account settings on first login.
- Multi Bots Mode is recommended to avoid flood errors and enable maximum download speed, especially if you are using downloaders like IDM and aria2c, which use multiple connections for downloads.
- To enable multi bots, generate new bot tokens from BotFather and add them through UI on first login.
- Uploads from UI will be slower due to limitations of the browser. Use modified [Rclone](https://github.com/divyam234/rclone) version for teldrive.
- Uploads from UI will be slower due to limitations of the browser. Use modified [Rclone](https://github.com/tgdrive/rclone) version for teldrive.
- Files are deleted at regular interval of one hour through cron job from tg channel after its deleted from teldrive this is done so that person can recover files if he/she accidently deletes them.

### Advanced Configuration
Expand Down
10 changes: 5 additions & 5 deletions api/router.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package api

import (
"github.com/divyam234/teldrive/internal/cache"
"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/middleware"
"github.com/divyam234/teldrive/pkg/controller"
"github.com/divyam234/teldrive/ui"
"github.com/gin-gonic/gin"
"github.com/tgdrive/teldrive/internal/cache"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/middleware"
"github.com/tgdrive/teldrive/pkg/controller"
"github.com/tgdrive/teldrive/ui"
"gorm.io/gorm"
)

Expand Down
26 changes: 13 additions & 13 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,6 @@ import (
"time"
"unicode"

"github.com/divyam234/teldrive/api"
"github.com/divyam234/teldrive/internal/cache"
"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/database"
"github.com/divyam234/teldrive/internal/duration"
"github.com/divyam234/teldrive/internal/kv"
"github.com/divyam234/teldrive/internal/logging"
"github.com/divyam234/teldrive/internal/middleware"
"github.com/divyam234/teldrive/internal/tgc"
"github.com/divyam234/teldrive/internal/utils"
"github.com/divyam234/teldrive/pkg/controller"
"github.com/divyam234/teldrive/pkg/cron"
"github.com/divyam234/teldrive/pkg/services"
"github.com/gin-contrib/gzip"
"github.com/gin-contrib/pprof"
ginzap "github.com/gin-contrib/zap"
Expand All @@ -33,6 +20,19 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"github.com/tgdrive/teldrive/api"
"github.com/tgdrive/teldrive/internal/cache"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/database"
"github.com/tgdrive/teldrive/internal/duration"
"github.com/tgdrive/teldrive/internal/kv"
"github.com/tgdrive/teldrive/internal/logging"
"github.com/tgdrive/teldrive/internal/middleware"
"github.com/tgdrive/teldrive/internal/tgc"
"github.com/tgdrive/teldrive/internal/utils"
"github.com/tgdrive/teldrive/pkg/controller"
"github.com/tgdrive/teldrive/pkg/cron"
"github.com/tgdrive/teldrive/pkg/services"
"go.uber.org/fx"
"go.uber.org/zap/zapcore"
"gorm.io/gorm"
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package cmd
import (
"runtime"

"github.com/divyam234/teldrive/internal/config"
"github.com/spf13/cobra"
"github.com/tgdrive/teldrive/internal/config"
)

func NewVersion() *cobra.Command {
Expand Down
2 changes: 1 addition & 1 deletion docker/compose/teldrive.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
teldrive:
image: ghcr.io/divyam234/teldrive
image: ghcr.io/tgdrive/teldrive
restart: always
container_name: teldrive
networks:
Expand Down
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/divyam234/teldrive
module github.com/tgdrive/teldrive

go 1.22

Expand Down
6 changes: 3 additions & 3 deletions internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"strconv"
"strings"

"github.com/divyam234/teldrive/internal/cache"
"github.com/divyam234/teldrive/pkg/models"
"github.com/divyam234/teldrive/pkg/types"
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v5"
"github.com/tgdrive/teldrive/internal/cache"
"github.com/tgdrive/teldrive/pkg/models"
"github.com/tgdrive/teldrive/pkg/types"
"gorm.io/gorm"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

"github.com/coocood/freecache"
"github.com/divyam234/teldrive/internal/config"
"github.com/redis/go-redis/v9"
"github.com/tgdrive/teldrive/internal/config"
"github.com/vmihailenco/msgpack/v5"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"time"

"github.com/divyam234/teldrive/pkg/schemas"
"github.com/stretchr/testify/assert"
"github.com/tgdrive/teldrive/pkg/schemas"
)

func TestCache(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions internal/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package database
import (
"time"

"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/logging"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/logging"

extraClausePlugin "github.com/WinterYukky/gorm-extra-clause-plugin"
"go.uber.org/zap/zapcore"
Expand Down
2 changes: 1 addition & 1 deletion internal/database/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"time"

"github.com/divyam234/teldrive/internal/logging"
"github.com/tgdrive/teldrive/internal/logging"

"go.uber.org/zap"
"go.uber.org/zap/zapcore"
Expand Down
4 changes: 2 additions & 2 deletions internal/kv/bolt.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"path/filepath"
"time"

"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/utils"
"github.com/mitchellh/go-homedir"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/utils"
"go.etcd.io/bbolt"
)

Expand Down
4 changes: 2 additions & 2 deletions internal/middleware/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"time"

"github.com/divyam234/cors"
"github.com/divyam234/teldrive/internal/auth"
"github.com/divyam234/teldrive/internal/cache"
"github.com/gin-contrib/secure"
"github.com/tgdrive/teldrive/internal/auth"
"github.com/tgdrive/teldrive/internal/cache"
"gorm.io/gorm"

"github.com/gin-gonic/gin"
Expand Down
2 changes: 1 addition & 1 deletion internal/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"context"
"sync"

"github.com/divyam234/teldrive/internal/logging"
"github.com/gotd/td/telegram"
"github.com/gotd/td/tg"
"github.com/tgdrive/teldrive/internal/logging"
"go.uber.org/zap"
)

Expand Down
12 changes: 6 additions & 6 deletions internal/reader/decrypted_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"fmt"
"io"

"github.com/divyam234/teldrive/internal/cache"
"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/crypt"
"github.com/divyam234/teldrive/internal/tgc"
"github.com/divyam234/teldrive/pkg/schemas"
"github.com/divyam234/teldrive/pkg/types"
"github.com/gotd/td/tg"
"github.com/tgdrive/teldrive/internal/cache"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/crypt"
"github.com/tgdrive/teldrive/internal/tgc"
"github.com/tgdrive/teldrive/pkg/schemas"
"github.com/tgdrive/teldrive/pkg/types"
)

type DecrpytedReader struct {
Expand Down
10 changes: 5 additions & 5 deletions internal/reader/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import (
"fmt"
"io"

"github.com/divyam234/teldrive/internal/cache"
"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/tgc"
"github.com/divyam234/teldrive/pkg/schemas"
"github.com/divyam234/teldrive/pkg/types"
"github.com/gotd/td/tg"
"github.com/tgdrive/teldrive/internal/cache"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/tgc"
"github.com/tgdrive/teldrive/pkg/schemas"
"github.com/tgdrive/teldrive/pkg/types"
)

type Range struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/reader/tg_multi_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"io"
"time"

"github.com/divyam234/teldrive/internal/cache"
"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/tgc"
"github.com/gotd/td/tg"
"github.com/tgdrive/teldrive/internal/cache"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/tgc"
"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/reader/tg_multi_reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"testing"
"time"

"github.com/divyam234/teldrive/internal/config"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/suite"
"github.com/tgdrive/teldrive/internal/config"
)

type testChunkSource struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/tgc/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"runtime"
"sync"

"github.com/divyam234/teldrive/internal/config"
"github.com/divyam234/teldrive/internal/kv"
"github.com/divyam234/teldrive/pkg/types"
"github.com/gotd/td/telegram"
"github.com/gotd/td/tg"
"github.com/tgdrive/teldrive/internal/config"
"github.com/tgdrive/teldrive/internal/kv"
"github.com/tgdrive/teldrive/pkg/types"
"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/tgc/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package tgc
import (
"context"

"github.com/divyam234/teldrive/internal/logging"
"github.com/gotd/td/telegram"
"github.com/pkg/errors"
"github.com/tgdrive/teldrive/internal/logging"
"go.uber.org/zap"
)

Expand Down
Loading

0 comments on commit 5fd4105

Please sign in to comment.