Skip to content

Commit

Permalink
fix ftp deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenorzz committed Jul 5, 2024
1 parent bed4bb6 commit 4da4395
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 18 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to the "goploy" extension will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),


## [1.17.2] - 2024-07-05

### Bug fixed

- ftp deploy


## [1.17.2] - 2024-06-12

### Added
Expand Down
18 changes: 13 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
#!/bin/bash

OS=`uname`

echo "Change version number? [Version number/N]";
read x

if [ "$OS" = 'Darwin' ]; then
CMD=gsed
else
CMD=sed
fi

if [[ $x =~ ^[1-9].[0-9]+.[0-9]+$ ]]
then
sed -i -e "s/const appVersion = \"[0-9].[0-9]\+.[0-9]\+\"/const appVersion = \"$x\"/g" cmd/server/main.go
sed -i -e "s/@version [0-9].[0-9]\+.[0-9]\+/@version $x/g" cmd/server/main.go
sed -i -e "s/'[0-9].[0-9]\+.[0-9]\+'/'$x'/g" database/goploy.sql
sed -i -e "s/GOPLOY_VER=v[0-9].[0-9]\+.[0-9]\+/GOPLOY_VER=v$x/g" docker/Dockerfile
sed -i -e "s/\"version\": \"[0-9].[0-9]\+.[0-9]\+\"/\"version\": \"$x\"/g" web/package.json
$CMD -i -e "s/const appVersion = \"[0-9].[0-9]\+.[0-9]\+\"/const appVersion = \"$x\"/g" cmd/server/main.go
$CMD -i -e "s/@version [0-9].[0-9]\+.[0-9]\+/@version $x/g" cmd/server/main.go
$CMD -i -e "s/'[0-9].[0-9]\+.[0-9]\+'/'$x'/g" database/goploy.sql
$CMD -i -e "s/GOPLOY_VER=v[0-9].[0-9]\+.[0-9]\+/GOPLOY_VER=v$x/g" docker/Dockerfile
$CMD -i -e "s/\"version\": \"[0-9].[0-9]\+.[0-9]\+\"/\"version\": \"$x\"/g" web/package.json
fi

echo "Build web? [Y/N]";
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var (
s string
)

const appVersion = "1.17.2"
const appVersion = "1.17.3"

func init() {
flag.StringVar(&config.AssetDir, "asset-dir", "", "default: ./")
Expand All @@ -65,7 +65,7 @@ func init() {
}

// @title Goploy
// @version 1.17.2
// @version 1.17.3
// @description A web deployment system tool!
// @contact.name zhenorzz
// @contact.url https://github.com/zhenorzz/goploy
Expand Down
2 changes: 1 addition & 1 deletion database/goploy.sql
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ CREATE TABLE IF NOT EXISTS `notification_template` (
INSERT IGNORE INTO `user`(`id`, `account`, `password`, `name`, `contact`, `state`, `super_manager`) VALUES (1, 'admin', '$2a$10$89ZJ2xeJj35GOw11Qiucr.phaEZP4.kBX6aKTs7oWFp1xcGBBgijm', '超管', '', 1, 1);
INSERT IGNORE INTO `namespace`(`id`, `name`) VALUES (1, 'goploy');
INSERT IGNORE INTO `namespace_user`(`id`, `namespace_id`, `user_id`, `role_id`) VALUES (1, 1, 1, 0);
INSERT IGNORE INTO `system_config` (`id`, `key`, `value`) VALUES (1, 'version', '1.17.2');
INSERT IGNORE INTO `system_config` (`id`, `key`, `value`) VALUES (1, 'version', '1.17.3');
INSERT IGNORE INTO `role`(`id`, `name`, `description`) VALUES (1, 'manager', '');
INSERT IGNORE INTO `role`(`id`, `name`, `description`) VALUES (2, 'member', '');
INSERT IGNORE INTO `permission`(`id`, `pid`, `name`, `sort`, `description`) VALUES (1, 0, 'Log', 0, '');
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Import sql manually https://github.com/zhenorzz/goploy/blob/master/model/sql/goploy.sql
FROM alpine
LABEL maintainer="zhenorzz@gmail.com"
ARG GOPLOY_VER=v1.17.2
ARG GOPLOY_VER=v1.17.3
ENV GOPLOY_VER=${GOPLOY_VER}

RUN echo "https://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories
Expand Down
3 changes: 3 additions & 0 deletions internal/repo/ftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ func (ftpRepo FtpRepo) Follow(projectID int64, _ string, projectURL string, _ st
return err
}
for _, entry := range remoteEntries {
if entry.Name == "." || entry.Name == ".." {
continue
}
if entry.Type == 1 {
nextLocalDir := path.Join(localDir, entry.Name)
if err := os.Mkdir(nextLocalDir, 0755); err != nil {
Expand Down
16 changes: 8 additions & 8 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "goploy",
"version": "1.17.2",
"version": "1.17.3",
"license": "GPL-3.0-or-later",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 4da4395

Please sign in to comment.