You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2003/01/04 12:48:12 UTC
cvs commit: jakarta-turbine-maven/src/admin deploy-snapshot-jar.bat deploy-jar.bat
dion 2003/01/04 03:48:12
Modified: src/admin deploy-snapshot-jar.bat deploy-jar.bat
Log:
Update snapshot script to:
1) Allow group and artifact id's to be specified
2) chmod/chgrp the .md5 file when created
3) ln -sf to the .md5 snapshot rather than recreate
Revision Changes Path
1.4 +25 -16 jakarta-turbine-maven/src/admin/deploy-snapshot-jar.bat
Index: deploy-snapshot-jar.bat
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/admin/deploy-snapshot-jar.bat,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- deploy-snapshot-jar.bat 3 Jan 2003 18:38:02 -0000 1.3
+++ deploy-snapshot-jar.bat 4 Jan 2003 11:48:11 -0000 1.4
@@ -1,26 +1,35 @@
@Echo off
-Rem Deploy JAR to the repository
-Rem %1 : artifact to copy
-Rem %2 : project id
-Rem %3 : user id
+@Rem Deploy JAR to the repository
+@Rem %1 : artifact to copy, e.g. commons-jelly-tags-bewtixt-1.0-beta4.jar
+@Rem %2 : project/group id, e.g. commons-jelly
+@Rem %3 : artifact id, or user id if no artifact id is needed, e.g. commons-jelly-tags-betwixt
+@Rem %4 : user id, or nothing if no artifact id is needed , e.g. diongillard
Set ARTIFACT=%1
-Set ID=%2
-Set User=%3
+Set GROUPID=%2
+Set ARTIFACTID=%3
+Set USER=%4
+
+If "%4" == "" Set USER=%3
+If "%4" == "" Set ARTIFACTID=%GROUPID%
+
Set ARTIFACT_TYPE=jars
Set REPO=login.ibiblio.org
-Set DIR=/public/html/maven/%ID%/%ARTIFACT_TYPE%
+Set DIR=/public/html/maven/%GROUPID%/%ARTIFACT_TYPE%
+Set REMOTEFILE=%DIR%/%ARTIFACT%
+Set SNAPSHOTFILE=%ARTIFACTID%-SNAPSHOT.jar
-echo %DIR%
+echo Uploading to %DIR%
-Rem Make sure the target directory is present.
+Echo Making sure the target directory is present.
ssh %USER%@%REPO% "mkdir -p %DIR%"
-Rem Copy the artifact to the repository.
-scp %ARTIFACT% %USER%@%REPO%:%DIR%
-
-Rem Make sure the perms are correct. Just in case
-ssh %USER%@%REPO% "chmod 664 %DIR%/%ARTIFACT%; chgrp maven %DIR%/%ARTIFACT%; cd %DIR%; md5sum %ARTIFACT% | sed 's/ .*$//' > %ARTIFACT%.md5"
+Echo Copying the artifact to the repository.
+scp %ARTIFACT% %USER%@%REPO%:%DIR%/
-Rem set up snapshot link
-ssh %USER%@%REPO% "cd %DIR%; ln -sf %ARTIFACT% %ID%-SNAPSHOT.jar; md5sum %ARTIFACT% | sed 's/ .*$//' > %ID%-SNAPSHOT.jar.md5"
+Echo Making sure the perms are correct on the file, and creating the .md5
+ssh %USER%@%REPO% "chmod 664 %REMOTEFILE%; chgrp maven %REMOTEFILE%; cd %DIR%; md5sum %ARTIFACT% | sed 's/ .*$//' > %ARTIFACT%.md5"
+Echo Making sure the perms are correct on the md5
+ssh %USER%@%REPO% "chmod 664 %REMOTEFILE%.md5; chgrp maven %REMOTEFILE%.md5"
+Echo Setting up the snapshot link
+ssh %USER%@%REPO% "cd %DIR%; ln -sf %ARTIFACT% %SNAPSHOTFILE%; ln -sf %ARTIFACT%.md5 %SNAPSHOTFILE%.md5"
1.3 +11 -10 jakarta-turbine-maven/src/admin/deploy-jar.bat
Index: deploy-jar.bat
===================================================================
RCS file: /home/cvs/jakarta-turbine-maven/src/admin/deploy-jar.bat,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- deploy-jar.bat 3 Jan 2003 18:38:02 -0000 1.2
+++ deploy-jar.bat 4 Jan 2003 11:48:12 -0000 1.3
@@ -1,23 +1,24 @@
@Echo off
Rem Deploy JAR to the repository
-Rem %1 : artifact to copy
-Rem %2 : project id
-Rem %3 : user id
+Rem %1 : artifact to copy, e.g. commons-jelly-tags-betwixt-1.0-beta5.jar
+Rem %2 : group id, e.g. commons-jelly
+Rem %3 : user id, e.g. diongillard
Set ARTIFACT=%1
-Set ID=%2
+Set GROUPID=%2
Set User=%3
+
Set ARTIFACT_TYPE=jars
Set REPO=login.ibiblio.org
-Set DIR=/public/html/maven/%ID%/%ARTIFACT_TYPE%
+Set DIR=/public/html/maven/%GROUPID%/%ARTIFACT_TYPE%
-echo %DIR%
+echo Uploading to %DIR%
-Rem Make sure the target directory is present.
+Echo Making sure the target directory is present.
ssh %USER%@%REPO% "mkdir -p %DIR%"
-Rem Copy the artifact to the repository.
-scp %ARTIFACT% %USER%@%REPO%:%DIR%
+Echo Copying the artifact to the repository.
+scp %ARTIFACT% %USER%@%REPO%:%DIR%/
-Rem Make sure the perms are correct. Just in case
+Echo Making sure the perms are correct, and creating the .md5
ssh %USER%@%REPO% "chmod 664 %DIR%/%ARTIFACT%; chgrp maven %DIR%/%ARTIFACT%; cd %DIR%; md5sum %ARTIFACT% | sed 's/ .*$//' > %ARTIFACT%.md5"