summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2017-04-24 01:30:17 -0700
committerH. Peter Anvin <hpa@zytor.com>2017-04-24 01:30:17 -0700
commit0adf4d95163b50db269e721ff455e08c90694f5f (patch)
treefc6b2e6d0f376146ba5452d46c46961e1d66b19b
parentf319eb86df8171c1d298807e2ecc84034fc84a25 (diff)
downloadnasmbuild-0adf4d95163b50db269e721ff455e08c90694f5f.tar.gz
nasmbuild-0adf4d95163b50db269e721ff455e08c90694f5f.tar.xz
nasmbuild-0adf4d95163b50db269e721ff455e08c90694f5f.zip
Add symlinks for stable and testing releases
-rwxr-xr-xbin/update_version19
-rwxr-xr-xbuildall.sh9
2 files changed, 22 insertions, 6 deletions
diff --git a/bin/update_version b/bin/update_version
index 893a0e6..003c54b 100755
--- a/bin/update_version
+++ b/bin/update_version
@@ -15,7 +15,7 @@
# Returns true on an update
#
-($new_ver, $file) = @ARGV;
+($new_ver, $file, $pubdir) = @ARGV;
sub version_id($) {
my ($line) = @_;
@@ -106,5 +106,20 @@ print FILE "1;\n";
print FILE "# ?>\n";
close(FILE);
-exit 0;
+if (defined($pubdir)) {
+ chdir($pubdir);
+ $stable_link = 'releasebuilds/'.$version;
+ $beta_link = 'releasebuilds/'.(defined($rc_version) ? $rc_version : $stable_version);
+
+ if (readlink('stable') ne $stable_link) {
+ unlink('stable');
+ symlink($stable_link, 'stable');
+ }
+ if (readlink('testing') ne $beta_link) {
+ unlink('testing');
+ symlink($beta_link, 'testing');
+ }
+}
+
+exit 0;
diff --git a/buildall.sh b/buildall.sh
index 9568d20..326f0b7 100755
--- a/buildall.sh
+++ b/buildall.sh
@@ -2,8 +2,9 @@
here=/home/nasmbuild/work
patchdir=/home/nasmbuild/patches
-snapdir=/pub/nasm/snapshots
-reldir=/pub/nasm/releasebuilds
+pubdir=/pub/nasm
+snapdir="$pubdir"/snapshots
+reldir="$pubdir"/releasebuilds
excludedir=/home/nasmbuild/exclude
repo=/pub/git/nasm/nasm.git
tagrepo=/pub/git/nasm/nasm-daily.git
@@ -231,10 +232,10 @@ process_release () {
case "$version" in
*rc*)
# -rc release
- update_version "$version" $web/version.inc
+ update_version "$version" $web/version.inc "$pubdir"
;;
*)
- if update_version "$version" $web/version.inc; then
+ if update_version "$version" $web/version.inc "$pubdir" ; then
( cd $web && rm -f doc && ln -s docs/"$version" doc )
fi
;;