From a54247aba152effdad5104e2580c822afc2c02d8 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 26 Jul 2021 17:24:34 +0200 Subject: [PATCH 1/6] Try to add a git dep --- example/pubspec.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 0edb667..897475f 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,11 @@ name: example publish_to: none environment: - sdk: '>=2.12.0 <3.0.0' + sdk: ">=2.12.0 <3.0.0" + +dependencies: + characters: + git: https://github.com/dart-lang/characters + dev_dependencies: test: any From 7385ee1c19928bdced6b07f48d058c04201a878e Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 26 Jul 2021 17:31:14 +0200 Subject: [PATCH 2/6] Print pub cache --- setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.sh b/setup.sh index 09e1ed9..03feddc 100755 --- a/setup.sh +++ b/setup.sh @@ -86,6 +86,7 @@ rm "${HOME}/dartsdk.zip" # Configure pub to use a fixed location. echo "PUB_CACHE=${HOME}/.pub-cache" >> $GITHUB_ENV +echo "Pub cache set to: ${HOME}/.pub-cache" # Update paths. echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH From 4cbfa2ad29102a1164b3ad466c457f2357096a80 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 26 Jul 2021 17:48:28 +0200 Subject: [PATCH 3/6] OS specific PUB cache location --- setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 03feddc..1b64e4d 100755 --- a/setup.sh +++ b/setup.sh @@ -85,8 +85,13 @@ fi rm "${HOME}/dartsdk.zip" # Configure pub to use a fixed location. +if [[$OS == windows]] +then +echo "PUB_CACHE=${USERPROFILE}\\.pub-cache" >> $GITHUB_ENV +else echo "PUB_CACHE=${HOME}/.pub-cache" >> $GITHUB_ENV -echo "Pub cache set to: ${HOME}/.pub-cache" +fi +echo "Pub cache set to: ${PUB_CACHE}" # Update paths. echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH From 01f8cc39a42c5efcea65a31a2c014e8c697dd454 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 26 Jul 2021 17:51:07 +0200 Subject: [PATCH 4/6] Fix typo --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 1b64e4d..dc472f8 100755 --- a/setup.sh +++ b/setup.sh @@ -85,7 +85,7 @@ fi rm "${HOME}/dartsdk.zip" # Configure pub to use a fixed location. -if [[$OS == windows]] +if [[ $OS == windows ]] then echo "PUB_CACHE=${USERPROFILE}\\.pub-cache" >> $GITHUB_ENV else From fd04b08f1cdb895528ccb5804d37334bd3e11f76 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 26 Jul 2021 17:58:20 +0200 Subject: [PATCH 5/6] Add extra variable --- setup.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index dc472f8..303448e 100755 --- a/setup.sh +++ b/setup.sh @@ -87,14 +87,15 @@ rm "${HOME}/dartsdk.zip" # Configure pub to use a fixed location. if [[ $OS == windows ]] then -echo "PUB_CACHE=${USERPROFILE}\\.pub-cache" >> $GITHUB_ENV + echo "${USERPROFILE}\\.pub-cache" >> $PUBCACHE else -echo "PUB_CACHE=${HOME}/.pub-cache" >> $GITHUB_ENV + echo "${HOME}/.pub-cache" >> $PUBCACHE fi -echo "Pub cache set to: ${PUB_CACHE}" +echo "PUB_CACHE=${PUBCACHE}" >> $GITHUB_ENV +echo "Pub cache set to: ${PUBCACHE}" # Update paths. -echo "${HOME}/.pub-cache/bin" >> $GITHUB_PATH +echo "${PUBCACHE}/bin" >> $GITHUB_PATH echo "${RUNNER_TOOL_CACHE}/dart-sdk/bin" >> $GITHUB_PATH # Report success, and print version. From 968ba1136c9a8d959b59cb593c4aaa148001b534 Mon Sep 17 00:00:00 2001 From: Michael Thomsen Date: Mon, 26 Jul 2021 18:01:20 +0200 Subject: [PATCH 6/6] Add extra variable --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 303448e..88edab6 100755 --- a/setup.sh +++ b/setup.sh @@ -87,9 +87,9 @@ rm "${HOME}/dartsdk.zip" # Configure pub to use a fixed location. if [[ $OS == windows ]] then - echo "${USERPROFILE}\\.pub-cache" >> $PUBCACHE + PUBCACHE="${USERPROFILE}\\.pub-cache" else - echo "${HOME}/.pub-cache" >> $PUBCACHE + PUBCACHE="${HOME}/.pub-cache" fi echo "PUB_CACHE=${PUBCACHE}" >> $GITHUB_ENV echo "Pub cache set to: ${PUBCACHE}"