* Publish With Yarn

* test a theory
This commit is contained in:
Garrett Serack 2017-09-22 17:57:21 -07:00 коммит произвёл Johannes Bader
Родитель d037ace0dd
Коммит 555a2cd339
5 изменённых файлов: 33 добавлений и 19 удалений

9
.gitignore поставляемый
Просмотреть файл

@ -288,4 +288,11 @@ __pycache__/
*.xsd.cs
package-lock.json
*.tgz
*.tgz
yarn.lock
package/
*.tar
*.tgz
src/obj/
*.log

Просмотреть файл

@ -1,15 +1,9 @@
task 'publish-preview', '', ['version-number'] , (done) ->
package_path = "#{basefolder}/package.json"
package_folder = "#{basefolder}"
task 'publish-preview', '', ['version-number','build'] , (done) ->
package_json = require "#{basefolder}/package.json"
# 1. update the patch number
package_json = require package_path
package_json.version = version
JSON.stringify(package_json,null,' ').to package_path
# 2. call npm publish --tag preview
# Note : this will call the npm prepare task, which will call
execute "npm publish --tag preview",{cwd:package_folder, silent:false }, (c,o,e) ->
echo "\n\nPublished: #{package_json.name}@#{info package_json.version} (tagged as @preview)\n\n"
done()
# move .gitignore out of the way - yarn bug
rm "-f", "#{basefolder}/.gitignore"
execute "#{basefolder}/node_modules/.bin/yarn publish --tag preview --new-version #{version} --access public ",{cwd:basefolder, silent:false }, (c,o,e) ->
echo "\n\nPublished: #{package_json.name}@#{info version} (tagged as @preview)\n\n"
# bring back .gitignore!
execute "git checkout #{basefolder}/.gitignore",{cwd:basefolder, silent:true }, done

Просмотреть файл

@ -15,7 +15,7 @@ regenExpected = (opts,done) ->
swaggerFiles = (if optsMappingsValue instanceof Array then optsMappingsValue[0] else optsMappingsValue).split(";")
args = [
"--#{opts.language}",
"--clear-output-folder",
# "--clear-output-folder", # run multiple times on same folders (API version nests)
"--output-folder=#{outputDir}/#{key}",
"--license-header=#{if !!opts.header then opts.header else 'MICROSOFT_MIT_NO_VERSION'}"
]
@ -74,4 +74,4 @@ task 'regenerate', '', (done) ->
'outputDir': 'Resource/Expected',
'language': 'azureresourceschema'
},done
return null
return null

Просмотреть файл

@ -1,7 +1,19 @@
.gulp/
.vscode/
src/Model/
src/Properties/
test/
src/obj/
package/
*.tar
*.tgz
gulpfile.js
*.sln
*.cs
*.resx
src/obj/
yarn.lock
src/obj/
*.log
*.csproj

Просмотреть файл

@ -45,7 +45,8 @@
"run-sequence": "*",
"shx": "^0.2.2",
"through2-parallel": "^0.1.3",
"yargs": "^8.0.2"
"yargs": "^8.0.2",
"yarn": "^1.0.2"
},
"dependencies": {
"dotnet-2.0.0": "^1.1.0"