From e14abb351c6a7b79659ce50fc3b41cb8af709718 Mon Sep 17 00:00:00 2001 From: Bryan Phelps Date: Fri, 15 Feb 2019 16:10:05 -0800 Subject: [PATCH] Initial release packages (#340) Build: Publish release packages --- .ci/esy-build-steps.yml | 5 +++++ .ci/publish-release.yml | 10 ++++++++++ .gitattributes | 6 ++++++ azure-pipelines.yml | 3 +++ package.json | 3 ++- scripts/release.sh | 5 +++++ 6 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .ci/publish-release.yml create mode 100644 .gitattributes create mode 100644 scripts/release.sh diff --git a/.ci/esy-build-steps.yml b/.ci/esy-build-steps.yml index 28083c3de..f3cdaa24d 100644 --- a/.ci/esy-build-steps.yml +++ b/.ci/esy-build-steps.yml @@ -12,3 +12,8 @@ steps: displayName: 'esy build' - script: esy b dune runtest displayName: 'esy b dune runtest' + - script: esy x Examples + displayName: 'esy x Examples' + continueOnError: true + - script: esy create-release + displayName: 'esy create-release' diff --git a/.ci/publish-release.yml b/.ci/publish-release.yml new file mode 100644 index 000000000..961106368 --- /dev/null +++ b/.ci/publish-release.yml @@ -0,0 +1,10 @@ +# Steps for publishing project cache + +steps: + - task: PublishBuildArtifacts@1 + displayName: '[Release]' + inputs: + pathToPublish: '_release' + artifactName: 'release-$(Agent.OS)' + parallel: true + parallelCount: 8 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..a6f14637b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,6 @@ +# Declare shell files to have LF endings on checkout +# On Windows, the default git setting for `core.autocrlf` +# means that when checking out code, LF endings get converted +# to CRLF. This causes problems for shell scripts, as bash +# gets choked up on the extra `\r` character. +*.sh text eol=lf diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 01a1a7212..f2b5cf6fe 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,6 +22,7 @@ jobs: - template: .ci/use-node.yml - template: .ci/restore-build-cache.yml - template: .ci/esy-build-steps.yml + - template: .ci/publish-release.yml - template: .ci/create-docs.yml - template: .ci/publish-build-cache.yml @@ -64,6 +65,7 @@ jobs: - template: .ci/use-node.yml - template: .ci/restore-build-cache.yml - template: .ci/esy-build-steps.yml + - template: .ci/publish-release.yml - template: .ci/publish-build-cache.yml - job: Windows @@ -82,4 +84,5 @@ jobs: - template: .ci/use-node.yml - template: .ci/restore-build-cache.yml - template: .ci/esy-build-steps.yml + - template: .ci/publish-release.yml - template: .ci/publish-build-cache.yml diff --git a/package.json b/package.json index df0c0c1ff..687a8dde3 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "test": "echo \"Error: no test specified\" && exit 1", "format": "esy dune build @fmt --auto-promote", "format:windows": "esy b .ci/format.sh", - "doc": "refmterr esy dune build @doc --root ." + "doc": "refmterr esy dune build @doc --root .", + "create-release": "sh ./scripts/release.sh" }, "homepage": "https://github.com/bryphe/revery#readme", "esy": { diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100644 index 000000000..e2e09778f --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,5 @@ +# Set path +RELEASE_PATH="$(pwd)/_release" +mkdir -p $RELEASE_PATH + +cp $cur__bin/* $RELEASE_PATH