You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by GitBox <gi...@apache.org> on 2022/02/14 12:44:58 UTC

[GitHub] [daffodil] stevedlawrence commented on a change in pull request #751: Modify the release candidate container to work for both daffodil and vscode

stevedlawrence commented on a change in pull request #751:
URL: https://github.com/apache/daffodil/pull/751#discussion_r805805682



##########
File path: containers/release-candidate/daffodil-release-candidate
##########
@@ -183,52 +212,81 @@ DAFFODIL_TUTORIALS_DIR=$DAFFODIL_SITE_DIR/site/tutorials
 DAFFODIL_DIST_DIR=$REPO_ROOT/$DAFFODIL_DIST
 DAFFODIL_RELEASE_DIR=$DAFFODIL_DIST_DIR/$VERSION-$PRE_RELEASE
 
-if [ -d "$DAFFODIL_RELEASE_DIR" ]; then echo -e "\n!!! Daffodil release directory already exists: $DAFFODIL_RELEASE_DIR !!! "; exit; fi
+if [ -d "$DAFFODIL_RELEASE_DIR" ]; then echo -e "\n!!! $PROJECT_NAME release directory already exists: $DAFFODIL_RELEASE_DIR !!! "; exit; fi
 
 git -C $DAFFODIL_CODE_DIR config --local user.name  "$GIT_COMMIT_NAME"
 git -C $DAFFODIL_CODE_DIR config --local user.email "$GIT_COMMIT_EMAIL"
 git -C $DAFFODIL_SITE_DIR config --local user.name  "$GIT_COMMIT_NAME"
 git -C $DAFFODIL_SITE_DIR config --local user.email "$GIT_COMMIT_EMAIL"
 
 echo
-echo "!!! Making release $VERSION-$PRE_RELEASE in $DAFFODIL_RELEASE_DIR !!!"
+echo "!!! Creating $PROJECT_NAME $VERSION-$PRE_RELEASE in $DAFFODIL_RELEASE_DIR !!!"
 echo
 
-if [ "$DRY_RUN" = true ]; then
-  SBT_PUBLISH="publishLocalSigned"
-else
-  SBT_PUBLISH="publishSigned"
-fi
-
-echo "Building Convenience Binaries and Publishing to Apache Repository..."
-sbt \
-  "set ThisBuild/updateOptions := updateOptions.value.withGigahorse(false)" \
-  "set ThisBuild/credentials += Credentials(\"Sonatype Nexus Repository Manager\", \"repository.apache.org\", \"$APACHE_USERNAME\", \"$APACHE_PASSWD\")" \
-  "set ThisBuild/publishTo := Some(\"Apache Staging Distribution Repository\" at \"https://repository.apache.org/service/local/staging/deploy/maven2\")" \
-  "set pgpSigningKey := Some(\"$PGP_SIGNING_KEY_ID\")" \
-  "+compile" \
-  "+$SBT_PUBLISH" \
-  "daffodil-cli/Rpm/packageBin" \
-  "daffodil-cli/Windows/packageBin" \
-  "daffodil-cli/Universal/packageBin" \
-  "daffodil-cli/Universal/packageZipTarball" \
-  "unidoc" \
-
 echo "Removing old release candidates..."
 find $DAFFODIL_DIST_DIR -maxdepth 1 -name $VERSION-\* -exec svn delete --force {} \;
 
-echo "Installing Source and Convenience Binaries..."
-mkdir -p $DAFFODIL_RELEASE_DIR/{src,bin}/
-git archive --format=zip --prefix=apache-daffodil-$VERSION-src/ HEAD > $DAFFODIL_RELEASE_DIR/src/apache-daffodil-$VERSION-src.zip
-cp daffodil-cli/target/universal/apache-daffodil-*.tgz $DAFFODIL_RELEASE_DIR/bin/
-cp daffodil-cli/target/universal/apache-daffodil-*.zip $DAFFODIL_RELEASE_DIR/bin/
-cp daffodil-cli/target/rpm/RPMS/noarch/apache-daffodil-*.rpm $DAFFODIL_RELEASE_DIR/bin/
-MSI_NAME=$(basename $DAFFODIL_RELEASE_DIR/bin/*.zip .zip).msi
-cp daffodil-cli/target/windows/Daffodil.msi $DAFFODIL_RELEASE_DIR/bin/$MSI_NAME
-chmod -x $DAFFODIL_RELEASE_DIR/bin/$MSI_NAME
+echo "Installing Source..."
+mkdir -p $DAFFODIL_RELEASE_DIR/src/
+git archive --format=zip --prefix=apache-$PROJECT_REPO-$VERSION-src/ HEAD > $DAFFODIL_RELEASE_DIR/src/apache-$PROJECT_REPO-$VERSION-src.zip
+
+case $PROJECT_REPO in
+  "daffodil")
+    if [ "$DRY_RUN" = true ]; then
+      SBT_PUBLISH="publishLocalSigned"
+    else
+      SBT_PUBLISH="publishSigned"
+    fi
+
+    echo "Building Convenience Binaries and Publishing to Apache Repository..."
+    sbt \
+      "set ThisBuild/updateOptions := updateOptions.value.withGigahorse(false)" \
+      "set ThisBuild/credentials += Credentials(\"Sonatype Nexus Repository Manager\", \"repository.apache.org\", \"$APACHE_USERNAME\", \"$APACHE_PASSWD\")" \
+      "set ThisBuild/publishTo := Some(\"Apache Staging Distribution Repository\" at \"https://repository.apache.org/service/local/staging/deploy/maven2\")" \
+      "set pgpSigningKey := Some(\"$PGP_SIGNING_KEY_ID\")" \
+      "+compile" \
+      "+$SBT_PUBLISH" \
+      "daffodil-cli/Rpm/packageBin" \
+      "daffodil-cli/Windows/packageBin" \
+      "daffodil-cli/Universal/packageBin" \
+      "daffodil-cli/Universal/packageZipTarball" \
+      "unidoc" \
+
+    echo "Installing Convenience Binaries..."
+    mkdir -p $DAFFODIL_RELEASE_DIR/bin/
+    cp daffodil-cli/target/universal/apache-daffodil-*.tgz $DAFFODIL_RELEASE_DIR/bin/
+    cp daffodil-cli/target/universal/apache-daffodil-*.zip $DAFFODIL_RELEASE_DIR/bin/
+    cp daffodil-cli/target/rpm/RPMS/noarch/apache-daffodil-*.rpm $DAFFODIL_RELEASE_DIR/bin/
+    MSI_NAME=$(basename $DAFFODIL_RELEASE_DIR/bin/*.zip .zip).msi
+    cp daffodil-cli/target/windows/Daffodil.msi $DAFFODIL_RELEASE_DIR/bin/$MSI_NAME
+    chmod -x $DAFFODIL_RELEASE_DIR/bin/$MSI_NAME
+
+    echo "Embedding RPM Signature..."
+    rpmsign --define "_gpg_name $PGP_SIGNING_KEY_ID" --define "_binary_filedigest_algorithm 10" --addsign $DAFFODIL_RELEASE_DIR/bin/*.rpm
+
+    echo "Installing Site Docs..."
+    rm -rf $DAFFODIL_DOCS_DIR
+    mkdir -p $DAFFODIL_DOCS_DIR/{javadoc,scaladoc}/
+    cp -R target/javaunidoc/* $DAFFODIL_DOCS_DIR/javadoc/
+    cp -R target/scala-2.12/unidoc/* $DAFFODIL_DOCS_DIR/scaladoc/
+
+    echo "Installing Site Tutorials..."
+    rm -rf $DAFFODIL_TUTORIALS_DIR
+    mkdir -p $DAFFODIL_TUTORIALS_DIR
+    cp -R tutorials/src/main/resources/* $DAFFODIL_TUTORIALS_DIR
+
+    ;;
+
+  "daffodil-vscode")
 
-echo "Embedding RPM Signature..."
-rpmsign --define "_gpg_name $PGP_SIGNING_KEY_ID" --define "_binary_filedigest_algorithm 10" --addsign $DAFFODIL_RELEASE_DIR/bin/*.rpm
+    echo "Building Convenience Binaries..."
+    mkdir -p $DAFFODIL_RELEASE_DIR/bin/
+    yarn build
+    cp daffodil-debugger-*.vsix $DAFFODIL_RELEASE_DIR/bin/

Review comment:
       I forgot about the potential rename.
   
   I'd rather not rename it here if it can be done in the vscode repo. I could imagine the original name of 'daffodil-debugger' might show up some where and confuse users if the original file they actually installed was something else (like the suggested apache-daffodil-vsocde name).
   
   But I think I'll change this to `cp *.vsix $DAFFODIL_RELEASE_DIR/bin/`. There should only ever be one .vsix file so no issues with globbing too much, and this allows it to be named whatever the project thinks makes sense.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org