Skip to content

Commit

Permalink
add packages tool
Browse files Browse the repository at this point in the history
  • Loading branch information
xxl4 committed Nov 3, 2023
1 parent 95fac6c commit dbfce15
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ http://localhost:8000/swagger/admin/index.html
[https://nicelizhi.github.io/easy-admin/](https://nicelizhi.github.io/easy-admin/)

# Issue
[https://github.com/nicelizhi/easy-admin/issues](https://github.com/nicelizhi/easy-admin/issues)
[https://github.com/nicelizhi/easy-admin/issues](https://github.com/nicelizhi/easy-admin/issues)
[https://gitee.com/nicelizhi/easy-admin/issues](https://gitee.com/nicelizhi/easy-admin/issues) (中国)

# Discussions
[https://github.com/nicelizhi/easy-admin/discussions](https://github.com/nicelizhi/easy-admin/discussions)
27 changes: 26 additions & 1 deletion config/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# quick start

## 1.1 config the file
```
vi ./config/settings.yml
```
## 1.2 import data
```
./easy-admin migrate
```
## 1.3 run command to start

```
./easy-admin server -c=config/settings.yml
```


# view all command
```
./easy-admin -h
```
# ⚙ config file full
```
settings:
Expand Down Expand Up @@ -60,4 +81,8 @@ settings:
demo:
name: data
```
```

# Issue
https://github.com/nicelizhi/easy-admin/issue
[https://gitee.com/nicelizhi/easy-admin/issues](https://gitee.com/nicelizhi/easy-admin/issues) (中国)
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ http://localhost:8000/swagger/admin/index.html
[https://nicelizhi.github.io/easy-admin/](https://nicelizhi.github.io/easy-admin/)

# Issue
[https://github.com/nicelizhi/easy-admin/issues](https://github.com/nicelizhi/easy-admin/issues)
[https://github.com/nicelizhi/easy-admin/issues](https://github.com/nicelizhi/easy-admin/issues)
[https://gitee.com/nicelizhi/easy-admin/issues](https://gitee.com/nicelizhi/easy-admin/issues) (中国)

# Discussions
[https://github.com/nicelizhi/easy-admin/discussions](https://github.com/nicelizhi/easy-admin/discussions)
64 changes: 64 additions & 0 deletions packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# compile for version
make
if [ $? -ne 0 ]; then
echo "make error"
exit 1
fi

easy_admin_version=`./easy-admin version`
echo "build version: $easy_admin_version"

# cross_compiles
make -f ./Makefile.cross-compiles

rm -rf ./release/packages
mkdir -p ./release/packages

os_all='linux windows darwin freebsd'
arch_all='386 amd64 arm arm64 mips64 mips64le mips mipsle riscv64'

cd ./release

for os in $os_all; do
for arch in $arch_all; do
easy_admin_dir_name="easy-admin_${easy_admin_version}_${os}_${arch}"
easy_admin_path="./packages/easy-admin_${easy_admin_version}_${os}_${arch}"

if [ "x${os}" = x"windows" ]; then
if [ ! -f "./easy-admin_${os}_${arch}.exe" ]; then
continue
fi
if [ ! -f "./easy-admin_${os}_${arch}.exe" ]; then
continue
fi
mkdir ${easy_admin_path}
mv ./easy-admin_${os}_${arch}.exe ${easy_admin_path}/easy-admin.exe
else
if [ ! -f "./easy-admin_${os}_${arch}" ]; then
continue
fi
mkdir ${easy_admin_path}
mv ./easy-admin_${os}_${arch} ${easy_admin_path}/easy-admin
fi
cp ../LICENSE ${easy_admin_path}
cp -rf ../config/*.sql ${easy_admin_path}
cp -rf ../config/README.md ${easy_admin_path}
cp -rf ../config/settings.yml ${easy_admin_path}
cp -rf ../config/settings.full.yml ${easy_admin_path}
rm -rf ${easy_admin_path}/legacy

# packages
cd ./packages
if [ "x${os}" = x"windows" ]; then
zip -rq ${easy_admin_dir_name}.zip ${easy_admin_dir_name}
else
tar -zcf ${easy_admin_dir_name}.tar.gz ${easy_admin_dir_name}
fi
cd ..
rm -rf ${easy_admin_path}
done
done

cd -

echo "Done"

0 comments on commit dbfce15

Please sign in to comment.