Skip to content

Commit

Permalink
Merge branch 'release/v1.0.18'
Browse files Browse the repository at this point in the history
  • Loading branch information
EvilBeaver committed Oct 24, 2017
2 parents 71cfff8 + b465651 commit e50582b
Show file tree
Hide file tree
Showing 213 changed files with 9,805 additions and 9,745 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ src/ScriptEngine.Snegopat/Snegopat_h.h
# Песональный вспомагательный скрипт
build.user.bat
src/packages/

src/DebugServer/node_modules/
# Visual Studio OpenCover and Test result
src/OpenCover
TestResult.xml
Expand Down
20 changes: 19 additions & 1 deletion BuildAll.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<BinFolder>$(OutputPathForBuild)\bin\</BinFolder>
<LibFolder>$(OutputPathForBuild)\lib\</LibFolder>
<DocFolder>$(OutputPathForBuild)\doc\</DocFolder>
<DebugDest>$(OutputPathForBuild)\vscode\</DebugDest>
<MDDocFolder>$(MSBuildProjectDirectory)\mddoc</MDDocFolder>
<ExamplesFolder>$(OutputPathForBuild)\examples\</ExamplesFolder>
<Solution>$(MSBuildProjectDirectory)\src\1Script.sln</Solution>
Expand Down Expand Up @@ -111,12 +112,26 @@

<Delete Files="@(RemoveUnnessesaryFiles)" />

<MakeDir Directories="@(DebugDist)"/>

<ItemGroup>
<DbgFiles Include="$(OutputPathForBuild)\DebugServer.exe"/>
<DbgFiles Include="$(OutputPathForBuild)\DebugServer.exe.config"/>
<DbgFiles Include="$(OutputPathForBuild)\OneScript.DebugProtocol.dll"/>
<DbgFiles Include="$(OutputPathForBuild)\Newtonsoft.Json.dll"/>
</ItemGroup>

<Copy SourceFiles="@(DbgFiles)" DestinationFolder="$(DebugDest)\bin"/>
<Move SourceFiles="$(OutputPathForBuild)\package.json" DestinationFolder="$(DebugDest)"/>
<Move SourceFiles="$(OutputPathForBuild)\images\mono-debug-icon.png" DestinationFolder="$(DebugDest)\images"/>

<ItemGroup>

<BinaryFiles Include="$(OutputPathForBuild)\oscript.exe"/>
<BinaryFiles Include="$(OutputPathForBuild)\TestApp.exe"/>
<BinaryFiles Include="$(OutputPathForBuild)\ScriptEngine.dll"/>
<BinaryFiles Include="$(OutputPathForBuild)\ScriptEngine.HostedScript.dll"/>
<BinaryFiles Include="$(OutputPathForBuild)\OneScript.DebugProtocol.dll"/>
<BinaryFiles Include="$(OutputPathForBuild)\Ionic.Zip.dll"/>
<BinaryFiles Include="$(OutputPathForBuild)\Newtonsoft.Json.dll"/>
<BinaryFiles Include="$(OutputPathForBuild)\ICSharpCode.AvalonEdit.dll"/>
Expand All @@ -134,8 +149,11 @@
<!-- Удаление артефактов NUnit -->
<ItemGroup>
<NUnitArtifacts Include="$(OutputPathForBuild)\*.dll"/>
<NUnitArtifacts Include="$(OutputPathForBuild)\ru\*.dll"/>
</ItemGroup>
<Delete Files="@(NUnitArtifacts)"/>
<Delete Files="@(DbgFiles)"/>
<Delete Files="@(NUnitArtifacts)"/>
<RemoveDir Directories="$(OutputPathForBuild)\ru"/>

<!-- Копирование скрипта запуска для opm -->
<Copy SourceFiles="$(MSBuildProjectDirectory)\install\opm.bat" DestinationFolder="$(BinFolder)"/>
Expand Down
97 changes: 91 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pipeline {
agent none

environment {
ReleaseNumber = 17
ReleaseNumber = 18
outputEnc = '65001'
}

Expand Down Expand Up @@ -41,13 +41,36 @@ pipeline {

}

stage('VSCode debugger Build') {
agent {
docker {
image 'node'
label 'linux'
}
}

steps {
unstash 'buildResults'
sh 'npm install vsce'
script {
def vsceBin = pwd() + "/node_modules/.bin/vsce"
sh "cd install/build/vscode && ${vsceBin} package"
archiveArtifacts artifacts: 'install/build/vscode/*.vsix', fingerprint: true
stash includes: 'install/build/vscode/*.vsix', name: 'vsix'
}
}
}

stage('Windows testing') {
agent { label 'windows' }

steps {
ws("$workspace".replaceAll("%", "_"))
{
unstash 'buildResults'
dir('install/build'){
deleteDir()
}
unstash 'buildResults'
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" BuildAll.csproj /p:Configuration=Release /p:Platform=x86 /t:xUnitTest"

junit 'tests/tests.xml'
Expand All @@ -60,7 +83,12 @@ pipeline {
agent { label 'master' }

steps {
unstash 'buildResults'

dir('install/build'){
deleteDir()
}

unstash 'buildResults'

sh '''\
if [ ! -d lintests ]; then
Expand Down Expand Up @@ -92,10 +120,14 @@ pipeline {
steps {
ws("$workspace".replaceAll("%", "_"))
{
unstash 'buildResults'
dir('install/build'){
deleteDir()
}
unstash 'buildResults'
//unstash 'sitedoc'
bat "chcp $outputEnc > nul\r\n\"${tool 'MSBuild'}\" BuildAll.csproj /p:Configuration=Release /p:Platform=x86 /t:CreateZip;CreateInstall;CreateNuget"
archiveArtifacts artifacts: '**/dist/*.exe, **/dist/*.msi, **/dist/*.zip, **/dist/*.nupkg, **/tests/*.xml', fingerprint: true
archiveArtifacts artifacts: '**/dist/*.exe, **/dist/*.msi, **/dist/*.zip, **/dist/*.nupkg', fingerprint: true
stash includes: 'dist/*.exe, **/dist/*.msi, **/dist/*.zip, **/dist/*.nupkg', name: 'winDist'
}
}
}
Expand All @@ -105,7 +137,10 @@ pipeline {

steps {

checkout scm
dir('install/build'){
deleteDir()
}
checkout scm
unstash 'buildResults'

sh '''
Expand All @@ -123,9 +158,59 @@ pipeline {
'''.stripIndent()

archiveArtifacts artifacts: 'output/*', fingerprint: true
stash includes: 'output/*', name: 'linDist'

}

}

stage ('Publishing night-build') {
when { anyOf {
branch 'develop';
branch 'release/*'
}
}

agent { label 'master' }

steps {
unstash 'winDist'
unstash 'linDist'
unstash 'vsix'

sh '''
TARGET="/var/www/oscript.io/download/versions/night-build/"
sudo rsync -rv --delete --exclude mddoc*.zip dist/* $TARGET
sudo rsync -rv --delete --exclude *.src.rpm output/* $TARGET
sudo rsync -rv --delete install/build/vscode/*.vsix $TARGET
'''.stripIndent()
}
}

stage ('Publishing master') {
when { branch 'master' }

agent { label 'master' }

steps {
unstash 'winDist'
unstash 'linDist'
unstash 'vsix'

sh """
TARGET="/var/www/oscript.io/download/versions/latest/"
sudo rsync -rv --delete --exclude mddoc*.zip dist/* \$TARGET
sudo rsync -rv --delete --exclude *.src.rpm output/* \$TARGET
sudo rsync -rv --delete install/build/vscode/*.vsix \$TARGET
TARGET="/var/www/oscript.io/download/versions/$rel/"
sudo rsync -rv --delete --exclude mddoc*.zip dist/* \$TARGET
sudo rsync -rv --delete --exclude *.src.rpm output/* \$TARGET
sudo rsync -rv --delete install/build/vscode/*.vsix \$TARGET
""".stripIndent()
}
}

}
Expand Down
62 changes: 62 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
SOLUTION_FILE=src/1Script_Mono.sln
PLATFORM="Any CPU"
CONFIGURATION=Release
SOURCEBINDIR=src/oscript/bin/${CONFIGURATION}
BIN_OUTPUTDIR=dist/bin
LIB_OUTPUTDIR=dist/lib
OSCRIPTEXE=${BIN_OUTPUTDIR}/oscript.exe
OPMOS=${LIB_OUTPUTDIR}/opm/opm.os
OPM="${OSCRIPTEXE} ${OPMOS}"
PREFIX=/usr

all: dist

dist: ${OSCRIPTEXE} lib

lib: ${OSCRIPTEXE}
test -d ${LIB_OUTPUTDIR} || mkdir -p ${LIB_OUTPUTDIR}
cp -r oscript-library/src/* ${LIB_OUTPUTDIR}

NUGET:
nuget restore ${SOLUTION_FILE}

${OSCRIPTEXE}: NUGET
msbuild /p:Platform=${PLATFORM} /p:Configuration=${CONFIGURATION} ${SOLUTION_FILE}
test -d ${BIN_OUTPUTDIR} || mkdir -p ${BIN_OUTPUTDIR}
cp ${SOURCEBINDIR}/*.dll ${BIN_OUTPUTDIR}
cp ${SOURCEBINDIR}/*.exe ${BIN_OUTPUTDIR}
cp ${SOURCEBINDIR}/*.cfg ${BIN_OUTPUTDIR}

clean:
rm -rf ${BIN_OUTPUTDIR}
rm -rf ${LIB_OUTPUTDIR}

${OPMOS}:

install: install_bin install_lib

install_bin:
mkdir -p ${PREFIX}/share/oscript/bin
cp ${BIN_OUTPUTDIR}/* ${PREFIX}/share/oscript/bin
cp install/builders/deb/oscript ${PREFIX}/bin/oscript
cp install/builders/deb/oscript-cgi ${PREFIX}/bin/oscript-cgi

install_lib:
mkdir -p ${PREFIX}/share/oscript/lib
cp -r ${LIB_OUTPUTDIR}/* ${PREFIX}/share/oscript/lib
cp install/builders/deb/oscript-opm ${PREFIX}/bin/oscript-opm
ln -s ${PREFIX}/bin/oscript-opm ${PREFIX}/bin/opm

uninstall: uninstall_lib uninstall_bin

uninstall_bin:
rm -rf ${PREFIX}/share/oscript/bin
rm ${PREFIX}/bin/oscript
rm ${PREFIX}/bin/oscript-cgi

uninstall_lib:
rm ${PREFIX}/bin/opm
rm ${PREFIX}/bin/oscript-opm
rm -rf ${PREFIX}/share/oscript/lib

.PHONY: all install uninstall dist lib clean
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# README #

[![Join the chat at https://gitter.im/EvilBeaver/OneScript](https://badges.gitter.im/EvilBeaver/OneScript.svg)](https://gitter.im/EvilBeaver/OneScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Join the chat at https://gitter.im/EvilBeaver/OneScript](https://badges.gitter.im/EvilBeaver/OneScript.svg)](https://gitter.im/EvilBeaver/OneScript?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

### Проект является независимой кросс-платформенной реализацией виртуальной машины, исполняющей скрипты на языке 1С:Предприятие.

Expand All @@ -22,4 +22,4 @@ http://oscript.io

## Библиотека полезных скриптов

В поставку OneScript уже входит набор наиболее часто используемых пакетов. Эти пакеты разрабатываются в едином репозитарии на github и доступны для всем желающим.
В поставку OneScript уже входит набор наиболее часто используемых пакетов. Эти пакеты разрабатываются в едином репозитарии на github https://github.com/oscript-library и доступны для всем желающим.
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
version: 1.0.17-alpha{build}
image: Visual Studio 2017
version: 1.0.18-alpha{build}
pull_requests:
do_not_increment_build_number: true
configuration: Release
Expand Down
2 changes: 2 additions & 0 deletions install/builders/deb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ mkdir -p $DSTPATH/usr/bin
mkdir -p $DSTPATH/usr/share/oscript/lib
mkdir -p $DSTPATH/usr/share/oscript/bin
mkdir -p $DSTPATH/etc
mkdir -p $DSTPATH/etc/bash_completion.d

cp ${BUILDERROOT}settings/dirs $DSTPATH/DEBIAN/
cat ${BUILDERROOT}settings/control | sed -r "s/VERSION/$VERSION/g" > $DSTPATH/DEBIAN/control
Expand All @@ -29,6 +30,7 @@ cp ${BINPATH}*.dll $DSTPATH/usr/share/oscript/bin
cp ${BUILDERROOT}oscript $DSTPATH/usr/bin
cp ${BUILDERROOT}oscript-cgi $DSTPATH/usr/bin
cp ${BUILDERROOT}oscript-opm $DSTPATH/usr/bin
cp ${BUILDERROOT}oscript-opm-completion $DSTPATH/etc/bash_completion.d
cp -r ${SRCPATH}/lib/* $DSTPATH/usr/share/oscript/lib
cp ${BINPATH}/oscript.cfg $DSTPATH/etc

Expand Down
16 changes: 16 additions & 0 deletions install/builders/deb/oscript-opm-completion
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
_opm_complete()
{
local cur opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ $COMP_CWORD == 1 ]] ; then
opts="build prepare install update app help config list run test version"
COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
return 0
fi
COMPREPLY=( $(compgen -df ${cur}) )
return 0
}
complete -F _opm_complete opm

# vim: filetype=sh
1 change: 1 addition & 0 deletions install/builders/deb/settings/dirs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/etc
/usr/share/oscript/bin
/usr/share/oscript/lib
/etc/bash_completion.d

1 change: 1 addition & 0 deletions install/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Name: "docs"; Description: "Документация по свойствам и
Source: "build\bin\oscript.exe"; DestDir: "{app}\bin"; Components: main
Source: "build\bin\ScriptEngine.HostedScript.dll"; DestDir: "{app}\bin"; Components: main
Source: "build\bin\ScriptEngine.dll"; DestDir: "{app}\bin"; Components: main
Source: "build\bin\OneScript.DebugProtocol.dll"; DestDir: "{app}\bin"; Components: main
Source: "build\bin\Ionic.Zip.dll"; DestDir: "{app}\bin"; Components: main
Source: "build\bin\Newtonsoft.Json.dll"; DestDir: "{app}\bin"; Components: main
Source: "build\bin\oscript.cfg"; DestDir: "{app}\bin"; Components: main; Flags: onlyifdoesntexist
Expand Down
Loading

0 comments on commit e50582b

Please sign in to comment.