Skip to content

Commit aa94ab4

Browse files
authored
Merge pull request #41 from launchdarkly/eb/ch36538/release-script
add release script (version update only)
2 parents f2783b3 + 6d5ed05 commit aa94ab4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

scripts/release.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# This script updates the version in the client code. It does not need to do anything else to release
3+
# a new version, because Packagist will pick up the new version automatically by watching our public
4+
# repository.
5+
6+
# It takes exactly one argument: the new version.
7+
# It should be run from the root of this git repo like this:
8+
# ./scripts/release.sh 4.0.9
9+
10+
# When done you should commit and push the changes made.
11+
12+
set -uxe
13+
echo "Starting php-client release (version update only)"
14+
15+
VERSION=$1
16+
17+
echo $VERSION >./VERSION
18+
19+
# Update version in LDClient class
20+
LDCLIENT_PHP=src/LaunchDarkly/LDClient.php
21+
LDCLIENT_PHP_TEMP=./LDClient.php.tmp
22+
sed "s/const VERSION = '.*'/const VERSION = '${VERSION}'/g" $LDCLIENT_PHP > $LDCLIENT_PHP_TEMP
23+
mv $LDCLIENT_PHP_TEMP $LDCLIENT_PHP
24+
25+
echo "Done with php-client release (version update only)"

0 commit comments

Comments
 (0)