Skip to content

Commit

Permalink
remove wins
Browse files Browse the repository at this point in the history
  • Loading branch information
wentaojin committed Nov 18, 2024
1 parent 88c9d80 commit 6798f34
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 217 deletions.
50 changes: 0 additions & 50 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,56 +105,6 @@ jobs:
pwd
sudo tar -zcvf dbms-community-${{ github.ref_name }}-linux-arm64.tar.gz dbms-community-${{ github.ref_name }}-linux-arm64/
ls -lnrt ${{ github.workspace }}/build
- name: Pack Platform DBMS Windows AMD64
run: |
ls -lnrt ${{ github.workspace }}/gocache/windows/amd64
sudo mkdir -p ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64
sudo mkdir -p ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/example
sudo mkdir -p ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/instantclient
cd ${{ github.workspace }}/gocache/windows/amd64
pwd
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/dbms-master-${{ github.ref_name }}-windows-amd64.tar.gz dbms-master
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/dbms-worker-${{ github.ref_name }}-windows-amd64.tar.gz dbms-worker
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/dbms-cluster-${{ github.ref_name }}-windows-amd64.tar.gz dbms-cluster
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/dbms-ctl-${{ github.ref_name }}-windows-amd64.tar.gz dbms-ctl
sudo cp -r ${{ github.workspace }}/example/* ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/example/
sudo cp -r ${{ github.workspace }}/local_install.sh ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/
sudo cp -r ${{ github.workspace }}/instantclient/instantclient-v19.8.0-windows-amd64.tar.gz ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/instantclient/
sudo chmod +x ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-amd64/local_install.sh
cd ${{ github.workspace }}/build
pwd
sudo tar -zcvf dbms-community-${{ github.ref_name }}-windows-amd64.tar.gz dbms-community-${{ github.ref_name }}-windows-amd64/
ls -lnrt ${{ github.workspace }}/build
- name: Pack Platform DBMS Windows 386
run: |
ls -lnrt ${{ github.workspace }}/gocache/windows/386
sudo mkdir -p ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386
sudo mkdir -p ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/example
sudo mkdir -p ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/instantclient
cd ${{ github.workspace }}/gocache/windows/386
pwd
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/dbms-master-${{ github.ref_name }}-windows-386.tar.gz dbms-master
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/dbms-worker-${{ github.ref_name }}-windows-386.tar.gz dbms-worker
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/dbms-cluster-${{ github.ref_name }}-windows-386.tar.gz dbms-cluster
sudo tar -zcvf ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/dbms-ctl-${{ github.ref_name }}-windows-386.tar.gz dbms-ctl
sudo cp -r ${{ github.workspace }}/example/* ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/example/
sudo cp -r ${{ github.workspace }}/local_install.sh ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/
sudo cp -r ${{ github.workspace }}/instantclient/instantclient-v19.8.0-windows-386.tar.gz ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/instantclient/
sudo chmod +x ${{ github.workspace }}/build/dbms-community-${{ github.ref_name }}-windows-386/local_install.sh
cd ${{ github.workspace }}/build
pwd
sudo tar -zcvf dbms-community-${{ github.ref_name }}-windows-386.tar.gz dbms-community-${{ github.ref_name }}-windows-386/
ls -lnrt ${{ github.workspace }}/build
- name: Build Release Changelog
id: github_release
Expand Down
20 changes: 1 addition & 19 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

# Compiled Platform
platforms=("linux/amd64" "linux/arm64" "windows/amd64" "windows/386")
platforms=("linux/amd64" "linux/arm64")

GO_VERSION_MAJOR=$(go version | sed -e 's/.*go\([0-9]\+\)\..*/\1/')
GO_VERSION_MINOR=$(go version | sed -e 's/.*go[0-9]\+\.\([0-9]\+\)\..*/\1/')
Expand Down Expand Up @@ -38,13 +38,9 @@ DBMS_WORKER="$APP_SRC/component/worker/main.go"
gocache="/gocache"
LINUX_AMD64_DIR="$gocache/linux/amd64"
LINUX_ARM64_DIR="$gocache/linux/arm64"
WINDOWS_AMD64_DIR="$gocache/windows/amd64"
WINDOWS_386_DIR="$gocache/windows/386"

mkdir -p $LINUX_AMD64_DIR
mkdir -p $LINUX_AMD64_DIR
mkdir -p $WINDOWS_AMD64_DIR
mkdir -p $WINDOWS_386_DIR

for platform in "${platforms[@]}"; do
IFS='/' read -r XGOOS XGOARCH <<< "$platform"
Expand All @@ -64,18 +60,4 @@ for platform in "${platforms[@]}"; do
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ GOOS=linux GOARCH=arm64 GO111MODULE=on CGO_ENABLED=1 go build -o "$LINUX_ARM64_DIR/dbms-master" -ldflags "$LDFLAGS" ${DBMS_MASTER}
CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ GOOS=linux GOARCH=arm64 GO111MODULE=on CGO_ENABLED=1 go build -o "$LINUX_ARM64_DIR/dbms-worker" -ldflags "$LDFLAGS" ${DBMS_WORKER}
fi

if { [ "$XGOOS" == "." ] || [ "$XGOOS" == "windows" ]; } && { [ "$XGOARCH" == "." ] || [ "$XGOARCH" == "amd64" ]; }; then
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_AMD64_DIR/dbms-ctl.exe" -ldflags "$LDFLAGS" ${DBMS_CLI}
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_AMD64_DIR/dbms-cluster.exe" -ldflags "$LDFLAGS" ${DBMS_CLUSTER}
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_AMD64_DIR/dbms-master.exe" -ldflags "$LDFLAGS" ${DBMS_MASTER}
CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix GOOS=windows GOARCH=amd64 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_AMD64_DIR/dbms-worker.exe" -ldflags "$LDFLAGS" ${DBMS_WORKER}
fi

if { [ "$XGOOS" == "." ] || [ "$XGOOS" == "windows" ]; } && { [ "$XGOARCH" == "." ] || [ "$XGOARCH" == "386" ]; }; then
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_386_DIR/dbms-ctl.exe" -ldflags "$LDFLAGS" ${DBMS_CLI}
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_386_DIR/dbms-cluster.exe" -ldflags "$LDFLAGS" ${DBMS_CLUSTER}
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_386_DIR/dbms-master.exe" -ldflags "$LDFLAGS" ${DBMS_MASTER}
CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix GOOS=windows GOARCH=386 GO111MODULE=on CGO_ENABLED=1 go build -o "$WINDOWS_386_DIR/dbms-worker.exe" -ldflags "$LDFLAGS" ${DBMS_WORKER}
fi
done
5 changes: 2 additions & 3 deletions database/oracle/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ import (
"strings"
"time"

"github.com/godror/godror"
"github.com/godror/godror/dsn"
"github.com/wentaojin/dbms/utils/constant"
"github.com/wentaojin/dbms/utils/stringutil"

"github.com/wentaojin/dbms/model/datasource"

"github.com/godror/godror"
"github.com/godror/godror/dsn"
)

type Database struct {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/gin-contrib/zap v1.1.3
github.com/gin-gonic/gin v1.10.0
github.com/go-sql-driver/mysql v1.8.1
github.com/godror/godror v0.44.1
github.com/godror/godror v0.45.1
github.com/golang/snappy v0.0.4
github.com/google/uuid v1.6.0
github.com/greatcloak/decimal v1.4.4
Expand Down Expand Up @@ -135,7 +135,7 @@ require (
go.opentelemetry.io/proto/otlp v1.2.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/net v0.28.0 // indirect
golang.org/x/time v0.5.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godror/godror v0.44.1 h1:jeit85/5RGu9qaMh3Oj6EqvIr6Ppl08fbUROjxf+YYs=
github.com/godror/godror v0.44.1/go.mod h1:oRlxogABC1Tr5u/zYF3EjHE1fYvAeNBS9MJ8bq1hVkU=
github.com/godror/godror v0.45.1 h1:MnnUcU9/9rpLV3/Amv6kiT82pAlR0v5MFk/EXdKrblU=
github.com/godror/godror v0.45.1/go.mod h1:44hxVDzvFSwc+yGyRM+riCLNAY5SwZkUfLzVTh5MXCg=
github.com/godror/knownpb v0.1.2 h1:icMyYsYVpGmzhoVA01xyd0o4EaubR31JPK1UxQWe4kM=
github.com/godror/knownpb v0.1.2/go.mod h1:zs9hH+lwj7mnPHPnKCcxdOGz38Axa9uT+97Ng+Nnu5s=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
Expand Down Expand Up @@ -360,6 +362,8 @@ golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn5
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7 h1:wDLEX9a7YQoKdKNQt88rtydkqDxeGaBUTnIYc3iG/mA=
golang.org/x/exp v0.0.0-20240716175740-e3f259677ff7/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
Expand Down
3 changes: 0 additions & 3 deletions utils/progress/terminal_posix.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build !windows
// +build !windows

// Copyright 2020 PingCAP, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
82 changes: 0 additions & 82 deletions utils/progress/terminal_windows.go

This file was deleted.

3 changes: 0 additions & 3 deletions utils/stringutil/string_posix.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build !windows
// +build !windows

/*
Copyright © 2020 Marvin
Expand Down
55 changes: 0 additions & 55 deletions utils/stringutil/string_windows.go

This file was deleted.

0 comments on commit 6798f34

Please sign in to comment.