Skip to content

Commit 3f91f20

Browse files
committed
Allows get tags and branches
1 parent 5f0ac1c commit 3f91f20

7 files changed

Lines changed: 82 additions & 4 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Exclude files and folders from export repository
22

3+
.gitattributes export-ignore
34
.gitignore export-ignore
45

56
/.github export-ignore

.github/get-classic-admin-theme.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
URL="https://codeload.github.com";
4+
AUTHOR="philwareham";
5+
REPO="textpattern-classic-admin-theme";
6+
EXTRACT="textpattern/admin-themes/classic";
7+
8+
9+
TAG="master";
10+
if [ ! -z "$1" ]; then
11+
TAG="$1";
12+
fi
13+
14+
echo "Get repo: $REPO :: $TAG";
15+
echo "-------------------------------------------------------------------------------";
16+
rm -rf $EXTRACT/*;
17+
curl $URL/$AUTHOR/$REPO/tar.gz/$TAG | tar xz --strip=3 --directory=$EXTRACT $REPO-$TAG/dist/classic

.github/get-default-theme.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
URL="https://codeload.github.com";
4+
AUTHOR="textpattern";
5+
REPO="textpattern-default-theme";
6+
EXTRACT="textpattern/setup/themes/default";
7+
8+
9+
TAG="master";
10+
if [ ! -z "$1" ]; then
11+
TAG="$1";
12+
fi
13+
14+
echo "Get repo: $REPO :: $TAG";
15+
echo "-------------------------------------------------------------------------------";
16+
rm -rf $EXTRACT/*;
17+
curl $URL/$AUTHOR/$REPO/tar.gz/$TAG | tar xz --strip=3 --directory=$EXTRACT $REPO-$TAG/dist/default_theme

.github/get-hive-admin-theme.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
URL="https://codeload.github.com";
4+
AUTHOR="philwareham";
5+
REPO="textpattern-hive-admin-theme";
6+
EXTRACT="textpattern/admin-themes";
7+
8+
9+
TAG="master";
10+
if [ ! -z "$1" ]; then
11+
TAG="$1";
12+
fi
13+
14+
echo "Get repo: $REPO :: $TAG";
15+
echo "-------------------------------------------------------------------------------";
16+
rm -rf $EXTRACT/hive*;
17+
curl $URL/$AUTHOR/$REPO/tar.gz/$TAG | tar xz --strip=2 --directory=$EXTRACT $REPO-$TAG/dist

.github/get-textpacks.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/sh
2+
3+
URL="https://codeload.github.com";
4+
AUTHOR="textpattern";
5+
REPO="textpacks";
6+
EXTRACT="textpattern/lang";
7+
8+
9+
TAG="master";
10+
if [ ! -z "$1" ]; then
11+
TAG="$1";
12+
fi
13+
14+
echo "Get repo: $REPO :: $TAG";
15+
echo "-------------------------------------------------------------------------------";
16+
rm -rf $EXTRACT/*.txt;
17+
curl $URL/$AUTHOR/$REPO/tar.gz/$TAG | tar xz --strip=2 --directory=$EXTRACT $REPO-$TAG/textpacks

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,15 @@ npm run get-textpacks
102102
npm run get-dependencies
103103
```
104104

105+
Request some branch or tag:
106+
107+
```ShellSession
108+
npm run get-classic-admin-theme 4.6.x
109+
npm run get-classic-admin-theme 4.6.1
110+
npm run get-hive-admin-theme 4.6.x
111+
npm run get-textpacks 4.6.x
112+
```
113+
105114
You can verify PHP code via a PHP linter from the CLI, like so:
106115

107116
```ShellSession

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030
"copy:jquery": "rimraf textpattern/vendors/jquery/jquery/jquery.js && cp node_modules/jquery/dist/jquery.min.js textpattern/vendors/jquery/jquery/jquery.js",
3131
"copy:zxcvbn": "rimraf textpattern/vendors/dropbox/zxcvbn/zxcvbn.js && cp node_modules/zxcvbn/dist/zxcvbn.js textpattern/vendors/dropbox/zxcvbn/zxcvbn.js",
3232
"get-dependencies": "npm run copy:jquery && npm run copy:zxcvbn",
33-
"get-textpacks": "rimraf textpattern/lang/*.txt && curl https://codeload.github.com/textpattern/textpacks/tar.gz/master | tar xz --strip=2 --directory=textpattern/lang textpacks-master/textpacks",
34-
"get-classic-admin-theme": "rimraf textpattern/admin-themes/classic/* && curl https://codeload.github.com/philwareham/textpattern-classic-admin-theme/tar.gz/master | tar xz --strip=3 --directory=textpattern/admin-themes/classic textpattern-classic-admin-theme-master/dist/classic",
35-
"get-hive-admin-theme": "rimraf textpattern/admin-themes/hive* && curl https://codeload.github.com/philwareham/textpattern-hive-admin-theme/tar.gz/master | tar xz --strip=2 --directory=textpattern/admin-themes textpattern-hive-admin-theme-master/dist",
36-
"get-default-theme": "rimraf textpattern/setup/themes/default/* && curl https://codeload.github.com/textpattern/textpattern-default-theme/tar.gz/master | tar xz --strip=3 --directory=textpattern/setup/themes/default textpattern-default-theme-master/dist/default_theme"
33+
"get-textpacks": "sh .github/get-textpacks.sh",
34+
"get-classic-admin-theme": "sh .github/get-classic-admin-theme.sh",
35+
"get-hive-admin-theme": "sh .github/get-hive-admin-theme.sh",
36+
"get-default-theme": "sh .github/get-default-theme.sh"
3737
},
3838
"license": "GPL-2.0"
3939
}

0 commit comments

Comments
 (0)