Commit
·
02d43ae
1
Parent(s):
5bc7d6f
Allow aborting before upload
Browse files- release.sh +7 -0
release.sh
CHANGED
|
@@ -47,6 +47,12 @@ mv Artifacts.toml artifacts/
|
|
| 47 |
bump-my-version bump $C
|
| 48 |
|
| 49 |
# 5. Upload tarballs to huggingface `artifacts` branch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
ARTIFACTS_DIR=artifacts
|
| 51 |
COMMIT_MSG="Update artifacts v$OLD_VERSION → v$NEW_VERSION"
|
| 52 |
# list of tarballs
|
|
@@ -60,6 +66,7 @@ huggingface-cli upload \
|
|
| 60 |
--commit-description "$COMMIT_DESC"
|
| 61 |
|
| 62 |
# 6. Check results
|
|
|
|
| 63 |
echo "Upload complete. Checking results at"
|
| 64 |
echo "https://huggingface.co/datasets/atomology/WannierDatasets/tree/$DEPLOY_BRANCH"
|
| 65 |
echo "https://huggingface.co/datasets/atomology/WannierDatasets/main/Artifacts.toml"
|
|
|
|
| 47 |
bump-my-version bump $C
|
| 48 |
|
| 49 |
# 5. Upload tarballs to huggingface `artifacts` branch
|
| 50 |
+
echo -n "Upload artifacts to huggingface. Are you sure? (y/N) "
|
| 51 |
+
read -r answer
|
| 52 |
+
if [[ ! $answer =~ ^[Yy]$ ]]; then
|
| 53 |
+
echo "Aborting."
|
| 54 |
+
exit 4
|
| 55 |
+
fi
|
| 56 |
ARTIFACTS_DIR=artifacts
|
| 57 |
COMMIT_MSG="Update artifacts v$OLD_VERSION → v$NEW_VERSION"
|
| 58 |
# list of tarballs
|
|
|
|
| 66 |
--commit-description "$COMMIT_DESC"
|
| 67 |
|
| 68 |
# 6. Check results
|
| 69 |
+
echo "\n\n\n" # Add some newlines for readability
|
| 70 |
echo "Upload complete. Checking results at"
|
| 71 |
echo "https://huggingface.co/datasets/atomology/WannierDatasets/tree/$DEPLOY_BRANCH"
|
| 72 |
echo "https://huggingface.co/datasets/atomology/WannierDatasets/main/Artifacts.toml"
|