瀏覽代碼

Merge pull request #2 from LithWang/master

2.2.0-preview2
Lith 7 月之前
父節點
當前提交
03f155948f

+ 19 - 1
Publish/DevOps3/environment/README.md → Publish/DevOps3/README.md

@@ -1,18 +1,36 @@
 
 
-# DevOps 3.6
+# DevOps 3.7
 
 
 
 
 # build-bash
 # build-bash
+> ../environment/build-bash__*
 extra steps for build, all sh files are optional (remove if not need).
 extra steps for build, all sh files are optional (remove if not need).
 
 
 
 
 # jenkins_NoNeedApprovalForBuild.txt
 # jenkins_NoNeedApprovalForBuild.txt
+> ../environment/jenkins_NoNeedApprovalForBuild.txt
 if this file exists, will not need approval for jenkins build.
 if this file exists, will not need approval for jenkins build.
 
 
 
 
+
+
+
+
+
+
+
+
+
 ----------------------------------------------
 ----------------------------------------------
 # ReleaseLog
 # ReleaseLog
 
 
+-----------------------
+# 3.7
+> 2024-09-21
+- fix can not release station bug
+- move environment dir out
+- fix bug: change version not work
+
 -----------------------
 -----------------------
 # 3.6
 # 3.6
 > 2024-08-30
 > 2024-08-30

+ 2 - 2
Publish/DevOps3/build-bash/10.Test.bash

@@ -21,7 +21,7 @@ if [ ! $NUGET_PATH ]; then NUGET_PATH=$basePath/Publish/release/.nuget; fi
 
 
 #----------------------------------------------
 #----------------------------------------------
 echo "#10.Test.bash -> #1 init test environment"
 echo "#10.Test.bash -> #1 init test environment"
-bashFile="$devOpsPath/environment/build-bash__10.Test__#1.InitEnv.sh"
+bashFile="$devOpsPath/../environment/build-bash__10.Test__#1.InitEnv.sh"
 if [ -f "$bashFile" ]; then
 if [ -f "$bashFile" ]; then
 	echo "#10.Test.bash -> #1 init test environment - Run bash"
 	echo "#10.Test.bash -> #1 init test environment - Run bash"
 	sh "$bashFile"
 	sh "$bashFile"
@@ -68,7 +68,7 @@ done
 "
 "
 #----------------------------------------------
 #----------------------------------------------
 echo "#10.Test.bash -> #3 clean test environment"
 echo "#10.Test.bash -> #3 clean test environment"
-bashFile="$devOpsPath/environment/build-bash__10.Test__#3.CleanEnv.sh"
+bashFile="$devOpsPath/../environment/build-bash__10.Test__#3.CleanEnv.sh"
 if [ -f "$bashFile" ]; then
 if [ -f "$bashFile" ]; then
 	echo "#10.Test.bash -> #1 Clean test environment - Run bash"
 	echo "#10.Test.bash -> #1 Clean test environment - Run bash"
 	sh "$bashFile"
 	sh "$bashFile"

+ 1 - 0
Publish/DevOps3/build-bash/20.change-app-version.bash

@@ -44,4 +44,5 @@ echo "nextAppVersion: $nextAppVersion"
 #----------------------------------------------
 #----------------------------------------------
 echo "#2 change app version from [$appVersion] to [$nextAppVersion]" 
 echo "#2 change app version from [$appVersion] to [$nextAppVersion]" 
 sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
 sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
+sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.props -exec grep '<Version>' -l {} \;`
 
 

+ 1 - 0
Publish/DevOps3/build-bash/21.change-to-next-version.bash

@@ -44,5 +44,6 @@ echo "nextAppVersion: $nextAppVersion"
 #----------------------------------------------
 #----------------------------------------------
 echo "#2 change app version from [$appVersion] to [$nextAppVersion]" 
 echo "#2 change app version from [$appVersion] to [$nextAppVersion]" 
 sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
 sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
+sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.props -exec grep '<Version>' -l {} \;`
 
 
 
 

+ 1 - 0
Publish/DevOps3/build-bash/22.add-suffix-to-app-version.bash

@@ -39,4 +39,5 @@ echo "nextAppVersion: $nextAppVersion"
 #----------------------------------------------
 #----------------------------------------------
 echo "#2 change app version from [$appVersion] to [$nextAppVersion]" 
 echo "#2 change app version from [$appVersion] to [$nextAppVersion]" 
 sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
 sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.csproj -exec grep '<pack>\|<publish>' -l {} \;`
+sed -i 's/'"<Version>$appVersion<\/Version>"'/'"<Version>$nextAppVersion<\/Version>"'/g'  `find ${basePath} -name *.props -exec grep '<Version>' -l {} \;`
 
 

+ 1 - 1
Publish/DevOps3/build-bash/30.nuget-pack.sh

@@ -14,7 +14,7 @@ export NUGET_PATH=$basePath/Publish/release/.nuget
 
 
 if [ ! $NUGET_PATH ]; then NUGET_PATH=$basePath/Publish/release/.nuget; fi
 if [ ! $NUGET_PATH ]; then NUGET_PATH=$basePath/Publish/release/.nuget; fi
 
 
-
+mkdir -p $basePath/Publish/release/release
 
 
 #----------------------------------------------
 #----------------------------------------------
 echo "30.nuget-pack.sh"
 echo "30.nuget-pack.sh"

+ 5 - 5
Publish/DevOps3/build-bash/40.Station-publish.sh

@@ -40,7 +40,7 @@ echo '#1 get netVersion'
 export netVersion=\$(grep '<TargetFramework>' \$(grep '<publish>' -rl --include *.csproj | head -n 1) | grep -oP '>(.*)<' | tr -d '<>')
 export netVersion=\$(grep '<TargetFramework>' \$(grep '<publish>' -rl --include *.csproj | head -n 1) | grep -oP '>(.*)<' | tr -d '<>')
 echo netVersion: \$netVersion
 echo netVersion: \$netVersion
 
 
-
+export basePath=/root/code
 export publishPath=/root/code/Publish/release/release/Station\(\$netVersion\)
 export publishPath=/root/code/Publish/release/release/Station\(\$netVersion\)
 mkdir -p \$publishPath
 mkdir -p \$publishPath
 
 
@@ -58,20 +58,20 @@ do
 	dotnet build --configuration Release
 	dotnet build --configuration Release
 	dotnet publish --configuration Release --output \"\$publishPath/\$publishName\"
 	dotnet publish --configuration Release --output \"\$publishPath/\$publishName\"
 
 
-	#copy xml
+	# copy xml
 	for filePath in bin/Release/\$netVersion/*.xml ; do \\cp -rf \$filePath \"\$publishPath/\$publishName\";done
 	for filePath in bin/Release/\$netVersion/*.xml ; do \\cp -rf \$filePath \"\$publishPath/\$publishName\";done
 done
 done
 
 
 
 
 #3 copy station release files
 #3 copy station release files
-if [ -d \"\/root/code/Publish/ReleaseFile/Station\" ]; then
+if [ -d \"/root/code/Publish/ReleaseFile/Station\" ]; then
 	echo '#3 copy station release files'
 	echo '#3 copy station release files'
-	\cp -rf \/root/code/Publish/ReleaseFile/Station/. \"\$publishPath\"
+	\cp -rf /root/code/Publish/ReleaseFile/Station/. \"\$publishPath\"
 fi
 fi
 
 
 
 
 #4 copy extra release files
 #4 copy extra release files
-bashFile=\"$devOpsPath/environment/build-bash__40.Station-publish__#4_copyExtraReleaseFiles.sh\"
+bashFile=\"$devOpsPath/../environment/build-bash__40.Station-publish__#4_copyExtraReleaseFiles.sh\"
 if [ -f \"\$bashFile\" ]; then
 if [ -f \"\$bashFile\" ]; then
 	echo '#4 copy extra release files'
 	echo '#4 copy extra release files'
 	sh \"\$bashFile\"
 	sh \"\$bashFile\"

+ 1 - 1
Publish/DevOps3/build-bash/41.extra-publish.sh

@@ -13,7 +13,7 @@ export NUGET_PATH=$basePath/Publish/release/.nuget
 
 
 #---------------------------------------------------------------------
 #---------------------------------------------------------------------
 #41.extra-publish.sh
 #41.extra-publish.sh
-bashFile="$PWD/../environment/build-bash__41.extra-publish.sh"
+bashFile="$PWD/../../environment/build-bash__41.extra-publish.sh"
 if [ -f "$bashFile" ]; then
 if [ -f "$bashFile" ]; then
 	echo '#41.extra-publish.sh'
 	echo '#41.extra-publish.sh'
 	sh "$bashFile"
 	sh "$bashFile"

+ 1 - 1
Publish/DevOps3/build-bash/52.docker-extra-copy.sh

@@ -13,7 +13,7 @@ export NUGET_PATH=$basePath/Publish/release/.nuget
 
 
 #---------------------------------------------------------------------
 #---------------------------------------------------------------------
 #52.docker-extra-copy.sh
 #52.docker-extra-copy.sh
-bashFile="$PWD/../environment/build-bash__52.docker-extra-copy.sh"
+bashFile="$PWD/../../environment/build-bash__52.docker-extra-copy.sh"
 if [ -f "$bashFile" ]; then
 if [ -f "$bashFile" ]; then
 	echo '#52.docker-extra-copy.sh'
 	echo '#52.docker-extra-copy.sh'
 	sh "$bashFile"
 	sh "$bashFile"

+ 1 - 1
Publish/DevOps3/build-bash/startup.bash

@@ -26,7 +26,7 @@ done
 
 
 
 
 
 
- 
+
 #----------------------------------------------
 #----------------------------------------------
 #
 #
 cd $curPath
 cd $curPath

+ 0 - 6
Publish/DevOps3/github-bash/76.github-push-release.sh

@@ -36,12 +36,6 @@ echo "release_body=${APPNAME} ${appVersion}" >> $GITHUB_ENV
 echo "release_dirPath=${basePath}/Publish/release/release-zip" >> $GITHUB_ENV
 echo "release_dirPath=${basePath}/Publish/release/release-zip" >> $GITHUB_ENV
 echo "release_version=${appVersion}" >> $GITHUB_ENV
 echo "release_version=${appVersion}" >> $GITHUB_ENV
 
 
-#filePath=$basePath/Publish/release/release-zip/Sers-ServiceCenter(net6.0)-${appVersion}.zip
-#fileType="${filePath##*.}"
-#echo "release_assetPath=${filePath}" >> $GITHUB_ENV
-#echo "release_assetName=${APPNAME}-${appVersion}.${fileType}" >> $GITHUB_ENV
-#echo "release_contentType=application/zip" >> $GITHUB_ENV
-
 
 
 # draft or preivew
 # draft or preivew
 if [ "preview" = "$(echo $appVersion | tr -d \"0-9\-\\.\")" ]
 if [ "preview" = "$(echo $appVersion | tr -d \"0-9\-\\.\")" ]

+ 1 - 1
Publish/DevOps3/github-bash/startup.bash

@@ -32,7 +32,7 @@ export devOpsPath="$PWD/.."
 # export basePath=/root/temp/svn
 # export basePath=/root/temp/svn
 
 
 if [ ! $APPNAME ]; then 
 if [ ! $APPNAME ]; then 
-	export APPNAME=$(cat "$devOpsPath/environment/env.APPNAME.txt" | tr -d '\n')
+	export APPNAME=$(cat "$devOpsPath/../environment/env.APPNAME.txt" | tr -d '\n')
 	echo "APPNAME: [${APPNAME}]" 
 	echo "APPNAME: [${APPNAME}]" 
 fi
 fi
 
 

+ 5 - 5
Publish/DevOps3/jenkins-bash/CICD.ki.git_Multibranch.deploy.jenkinsfile

@@ -12,9 +12,9 @@ pipeline {
     environment {
     environment {
         // get APPNAME
         // get APPNAME
         // APPNAME = "Sers"
         // APPNAME = "Sers"
-        APPNAME = readFile("Publish/DevOps3/environment/env.APPNAME.txt")
+        APPNAME = readFile("Publish/environment/env.APPNAME.txt")
 
 
-        envName = readFile("Publish/DevOps3/environment/env.envName.txt")
+        envName = readFile("Publish/environment/env.envName.txt")
         versionSuffix = "-${envName}${env.build_number}"
         versionSuffix = "-${envName}${env.build_number}"
 
 
         // basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/${APPNAME}/${envName}/${env.BRANCH_NAME}/${env.build_number}"
         // basePath = "/root/docker-cache/jenkins/jenkins_home/workspace/${APPNAME}/${envName}/${env.BRANCH_NAME}/${env.build_number}"
@@ -57,7 +57,7 @@ pipeline {
                         echo "-------- DOCKER_ImagePrefix: [$DOCKER_ImagePrefix]"
                         echo "-------- DOCKER_ImagePrefix: [$DOCKER_ImagePrefix]"
                         echo "-------- codePath: [$codePath]"
                         echo "-------- codePath: [$codePath]"
 
 
-                        if ( fileExists("Publish/DevOps3/environment/jenkins_NoNeedApprovalForBuild.txt") ) {
+                        if ( fileExists("Publish/environment/jenkins_NoNeedApprovalForBuild.txt") ) {
                             echo "-------- do not need approval for build"
                             echo "-------- do not need approval for build"
 	                        env.ApprovalForBuild = "yes"
 	                        env.ApprovalForBuild = "yes"
                         } else {
                         } else {
@@ -78,10 +78,10 @@ pipeline {
             steps {
             steps {
                 script {
                 script {
                     echo "#2.1 change-app-version"
                     echo "#2.1 change-app-version"
-                    sshCommand remote: remote, command:  "sh -c 'set -e; export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps3/build-bash; source 22.add-suffix-to-app-version.bash;    echo -n \"\$nextAppVersion\" > $codePath/Publish/DevOps3/environment/env.appVersion.txt '"
+                    sshCommand remote: remote, command:  "sh -c 'set -e; export versionSuffix=$versionSuffix;    cd $codePath/Publish/DevOps3/build-bash; source 22.add-suffix-to-app-version.bash;    echo -n \"\$nextAppVersion\" > $codePath/Publish/environment/env.appVersion.txt '"
 
 
                     echo "#2.2 get app version"
                     echo "#2.2 get app version"
-                    env.appVersion = readFile("Publish/DevOps3/environment/env.appVersion.txt")
+                    env.appVersion = readFile("Publish/environment/env.appVersion.txt")
                     echo "-------- appVersion: [${env.appVersion}]"
                     echo "-------- appVersion: [${env.appVersion}]"
                 }
                 }
             }
             }

+ 0 - 0
Publish/DevOps3/environment/build-bash__10.Test__#1.InitEnv.sh → Publish/environment/build-bash__10.Test__#1.InitEnv.sh


+ 0 - 0
Publish/DevOps3/environment/build-bash__10.Test__#3.CleanEnv.sh → Publish/environment/build-bash__10.Test__#3.CleanEnv.sh


+ 0 - 0
Publish/DevOps3/environment/build-bash__40.Station-publish__#4_copyExtraReleaseFiles.sh.bak → Publish/environment/build-bash__40.Station-publish__#4_copyExtraReleaseFiles.sh.bak


+ 0 - 0
Publish/DevOps3/environment/build-bash__41.extra-publish.sh.bak → Publish/environment/build-bash__41.extra-publish.sh.bak


+ 0 - 0
Publish/DevOps3/environment/build-bash__52.docker-extra-copy.sh.bak → Publish/environment/build-bash__52.docker-extra-copy.sh.bak


+ 0 - 0
Publish/DevOps3/environment/env.APPNAME.txt → Publish/environment/env.APPNAME.txt


+ 0 - 0
Publish/DevOps3/environment/env.envName.txt → Publish/environment/env.envName.txt


+ 0 - 0
Publish/DevOps3/environment/jenkins_NoNeedApprovalForBuild.txt → Publish/environment/jenkins_NoNeedApprovalForBuild.txt


+ 11 - 2
src/Versions.props

@@ -1,6 +1,15 @@
 <Project>
 <Project>
     <PropertyGroup>
     <PropertyGroup>
-        <Version>2.2.0-develop</Version>
-        <Vitorm_Version>[2.2.0-preview, 2.3.0)</Vitorm_Version>
+        <Version>2.2.0-preview2</Version>
+        <Vitorm_Version>[2.2.0-preview2, 2.3.0)</Vitorm_Version>
+    </PropertyGroup>
+
+    <PropertyGroup>
+        <Authors>Lith</Authors>
+        <PackageProjectUrl>https://github.com/Vit-Orm/Vitorm.PostgreSQL</PackageProjectUrl>
+    </PropertyGroup>
+
+    <PropertyGroup>
+        <DocumentationFile>bin\Debug\$(TargetFramework)\$(MSBuildProjectName).xml</DocumentationFile>
     </PropertyGroup>
     </PropertyGroup>
 </Project>
 </Project>

+ 4 - 3
src/Vitorm.PostgreSQL/Vitorm.PostgreSQL.csproj

@@ -11,12 +11,13 @@
     </PropertyGroup>
     </PropertyGroup>
 
 
     <PropertyGroup>
     <PropertyGroup>
-        <Authors>Lith</Authors>
         <Description>orm for PostgreSQL</Description>
         <Description>orm for PostgreSQL</Description>
-        <PackageProjectUrl>https://github.com/Vit-Orm/Vitorm.PostgreSQL</PackageProjectUrl>
+        <PackageTags>orm vitorm database PostgreSQL</PackageTags>
+    </PropertyGroup>
+
+    <PropertyGroup>
         <PackageIcon>vitorm_logo_v1.png</PackageIcon>
         <PackageIcon>vitorm_logo_v1.png</PackageIcon>
         <PackageReadmeFile>README.md</PackageReadmeFile>
         <PackageReadmeFile>README.md</PackageReadmeFile>
-        <PackageTags>orm vitorm database PostgreSQL</PackageTags>
     </PropertyGroup>
     </PropertyGroup>
 
 
     <ItemGroup>
     <ItemGroup>