selfies 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +1 -1
- data/lib/selfies/version.rb +1 -1
- metadata +1 -2
- data/cci-config-generator.sh +0 -90
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7f9d0aff5a924bb8535316e2d6fc6d123ab6f27302aa521ef0fd49700ac9a75
|
4
|
+
data.tar.gz: 2a8100a1eeed137a8306f95f4e4d8279494f742da17d04a64b73308d22855f43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53e453795ea787243a8a069c11f020c7704be923cbcd20736bab9bc92004906eaa72f5afa3760df925b63915cbff06cb65305aebd499b7636f3b9792ddc9c55c
|
7
|
+
data.tar.gz: a41071f35347019d785a13707d0c828da8eb9711a5c2b1e40c0785fdf487fc089e4a10e5fa4403e5e44c68672b054359f6dc7b3037606f8132c5189c4b54b758
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/selfies/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: selfies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario D’Arco
|
@@ -26,7 +26,6 @@ files:
|
|
26
26
|
- Rakefile
|
27
27
|
- bin/console
|
28
28
|
- bin/setup
|
29
|
-
- cci-config-generator.sh
|
30
29
|
- lib/kernel.rb
|
31
30
|
- lib/selfies.rb
|
32
31
|
- lib/selfies/self_init.rb
|
data/cci-config-generator.sh
DELETED
@@ -1,90 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
# Script to generate a CircleCI 2.0 `.circleci/config.yml` file
|
4
|
-
# Please see the README for more details
|
5
|
-
|
6
|
-
echo -e "Gathering info please wait..."
|
7
|
-
|
8
|
-
# Get and set variables
|
9
|
-
circle_dir="./.circleci"
|
10
|
-
conf_file="./.circleci/config.yml"
|
11
|
-
vcs_provider="$(git remote get-url --push origin | perl -ne 'print $1 if /([A-Za-z]*)\.(com|org)/')"
|
12
|
-
project="$(git remote get-url --push origin | perl -ne 'print $1 if /([^\/:]*\/[^\/]*?)(.git)?$/')"
|
13
|
-
test_branch="circleci-20-test"
|
14
|
-
remote_test_branch="$(git ls-remote git@"$vcs_provider".com:"${project}".git "$test_branch")"
|
15
|
-
local_test_branch="$(git branch -a | grep "$test_branch")"
|
16
|
-
|
17
|
-
|
18
|
-
echo "git origin references \`${project}\` hosted by ${vcs_provider}, which will be used as source."
|
19
|
-
|
20
|
-
|
21
|
-
# Check if this is a GitHub or Bitbucket repo
|
22
|
-
if [ "$vcs_provider" != "github" ] && [ "$vcs_provider" != "bitbucket" ] ; then
|
23
|
-
echo -e "CircleCI currently supports bitbucket and github only"
|
24
|
-
exit
|
25
|
-
fi
|
26
|
-
|
27
|
-
# Set vcs_short variable
|
28
|
-
if [ "$vcs_provider" = "github" ]
|
29
|
-
then
|
30
|
-
vcs_short="gh"
|
31
|
-
fi
|
32
|
-
|
33
|
-
if [ "$vcs_provider" = "bitbucket" ]
|
34
|
-
then
|
35
|
-
vcs_short="bb"
|
36
|
-
fi
|
37
|
-
|
38
|
-
# Check if test branch exists on remote
|
39
|
-
if [ -n "$remote_test_branch" ]
|
40
|
-
then
|
41
|
-
echo -e "${test_branch} branch already exists on remote - please delete it before continuing."
|
42
|
-
exit
|
43
|
-
fi
|
44
|
-
|
45
|
-
# Check if branch exists locally and create it if not
|
46
|
-
if [ -z "$local_test_branch" ]
|
47
|
-
then
|
48
|
-
git checkout -b ${test_branch} && echo -e "Created ${test_branch} branch and switched to it."
|
49
|
-
else
|
50
|
-
echo -e "${test_branch} branch already exists locally - please delete it before continuing."
|
51
|
-
exit
|
52
|
-
fi
|
53
|
-
|
54
|
-
# Create .cirleci directory if it doesn't exist
|
55
|
-
if [ ! -d "$circle_dir" ]
|
56
|
-
then
|
57
|
-
mkdir "$circle_dir"
|
58
|
-
fi
|
59
|
-
|
60
|
-
# Create config.yml if it doesn't exist
|
61
|
-
if [ ! -d "$conf_file" ]
|
62
|
-
then
|
63
|
-
touch "$conf_file"
|
64
|
-
else
|
65
|
-
echo -e ".circleci/config.yml already exists. Please delete it before running this script again."
|
66
|
-
exit
|
67
|
-
fi
|
68
|
-
|
69
|
-
|
70
|
-
# Read in API token
|
71
|
-
read -rp 'Paste your CircleCI API token here: ' circle_token
|
72
|
-
|
73
|
-
# Generate config file from translation endpoint
|
74
|
-
echo -e "Generating config file via CircleCI API"
|
75
|
-
curl -X GET https://circleci.com/api/v1.1/project/"${vcs_provider}"/"${project}"/config-translation?circle-token="$circle_token"\&branch=${test_branch} > $conf_file
|
76
|
-
echo -e "Config file written to .circleci/config.yml"
|
77
|
-
|
78
|
-
read -rp 'Would you like to commit this change and push the test branch to try the build on CircleCI? (y/n): ' choice
|
79
|
-
|
80
|
-
if [ "$choice" = "y" ]
|
81
|
-
then
|
82
|
-
git add "$conf_file"
|
83
|
-
git commit -m "Adding auto-generated CircleCI 2.0 config file"
|
84
|
-
git push origin ${test_branch}
|
85
|
-
echo -e "Go to https://circleci.com/$vcs_short/$project to see the new build."
|
86
|
-
echo -e "If it passes - congratulations, you're good to go. If it's red, please see the README for next steps."
|
87
|
-
else
|
88
|
-
echo -e "You can manually trigger a build on CircleCI by committing and pushing this branch to the remote."
|
89
|
-
exit
|
90
|
-
fi
|